A modern web application that combines Power BI reports with chat interfaces powered by Azure OpenAI.
- Power BI report embedding
- Natural language to Power BI filter conversion
- General AI assistant powered by Azure OpenAI
- Modern, responsive UI
/public
- Frontend files (HTML, CSS, JavaScript)server.js
- Express backend server.env
- Configuration for Azure OpenAI and Power BI (you need to create this)package.json
- Project dependencies
-
Clone the repository
-
Install dependencies
npm install
-
Configure environment variables
Copy
.env.template
to.env
and add your credentials:cp .env.template .env
Then edit the
.env
file with your own credentials:- Azure OpenAI credentials
- Power BI credentials and report ID
-
Start the server
npm start
-
Access the application
Open your browser and go to:
http://localhost:3000
- Create an Azure OpenAI resource in your Azure portal
- Deploy a model (e.g., GPT-4 or GPT-3.5-Turbo)
- Get the API key, endpoint, and deployment name
- Add these to your .env file
For a full production implementation:
- Register an application in Azure AD
- Set up proper permissions for Power BI API
- Get client ID, client secret, and tenant ID
- Create a Power BI workspace and report
- Get the workspace ID and report ID
- Add all these details to your .env file
- The current implementation includes placeholder code for Power BI embedding
- In a production environment, you would implement proper token acquisition and embed the report
- The Azure OpenAI integration is fully functional once you add your credentials
Try these natural language queries in the PBI Filter Assistant:
- "Show me sales for the last quarter"
- "Filter to the top 5 products by revenue"
- "Show only data from the East region"
- "Clear all filters"
You can customize the system prompt for the filter generation in server.js
to match your specific Power BI report structure.