Embed Power BI Q&A Into Your Menu So You Can Ask For Reports
One of the coolest features within the Office 365 Power BI suite is the Q&A function where you can type in questions about the data and it will translate it into a query and then show you a report of the results. By linking this with your Dynamics AX data, even the most un-technical person should be able to become their own report writer. If you want to take this to the next level and make it even more accessible to the users then you may want to do a little bit of coding and add it directly to the users menus so that they can just click on the link and go straight to the Q&A page without even having to know the URL for Office 365.
It is like having your own personal data guru at your beck and call.
How To Do It…
- The first thing that you need to do is access your Power BI Q&A site so that you can get the initial URL that you want to link to the menu.
- After you know what you want to link to, you can start adding the menu item. And in order to do that we need to create a form that will be the website wrapper that we can then within the client. To do this, open up AOT and expand out the Forms group.
- Then right-mouse-click on the Forms group and select the New Form from the context menu.
- After you have done that you should have a generic Form control.
- Change the Name property of the Form to PowerBIQA.
- Then expand out the PowerBIQA form and the further expand the Design node.
- Right-mouse-click on the Design node, click on the New Control menu item and then select the ActiveX item.
- This will open up the ActiveX browser and you should be able to find the Microsoft Web Browser control and click on the OK button.
- This will add the control to the Design for us.
- Select the ActiveX control and change the Name property to PowerBIQA so that it is less generic.
- Then set the Width property to Column Width so that it takes up all of the horizontal space in the design.
- And also set the Height property to Column Height so that it takes up all of the vertical space in the design.
- Then select the Design node and change the Window Type property to Content Page – this will allow us later on to embed the form directly within the client.
- Now we need to tell the browser to navigate to the PowerBI website when it opens. To do this, right-click on the Methods group for the PowerBIQA form, select the Override Method menu item and select the Activate method.
- This will open up the code editor for the method.
- Add the following line of code to the activate() method:
PowerBIQA.Navigate(“Your PowerBI URL“);
And then close the editor.
- When you return to AOT, right-mouse-click on the PowerBIQA form and select the Open option.
- This should open up a form and show you the Power BI Q&A page.
- Now we need to add this form to the menu. To do this we first need to create a menu item that points to the form. To do this, expand out the Menu Items node within AOT and then expand out the Design node.
- Right-mouse-click on the Design node and select the New Menu Item menu item.
- This will create a new Menu Item control.
- Change the Name property of the menu item to PowerBIOpenQA and also change the Label and Help Text properties.
- Select the drop-down for the Object property, and you should be able to find the new form that you just created.
- After you have done that you can save your changes (CRTL+S) and then right-mouse-click on your new menu item control and select the Open menu item.
- This should open up the form again for you.
- The final step is for us to add the menu item to the menu itself. To do that expand out the Menus node and you will see all of the main menus in the system.
- Expand out the main that you want to add the menu item to – in our case it’s the SalesAndMarketing menu.
- Then right-mouse click on the group that you want to add it to – which we chose the Reports folder – and select the New menu item and then the Menu item sub-menu item.
- This will add a new menu item control to the menu.
- All you have to do here is select the Menu Item that you just created from the dropdown within the MenuItemName property.
- And one last tweak is to set the IsDisplayedInContentArea property to Yes so that it is embedded within the client rather than a separate form.
- Now just save the changes (CTRL+S) and exit and restart the Dynamics AX client.
- Now when you open up your menu you will see a new menu item for Power Q&A.
- Clicking on it will take you straight to the Power BI Q&A page.
Once you start asking questions, you can refine your answer… And then filter out to particular records… And then even compare and contrast multiple sets of data.
Now that is super cool.
To view the original post and also download the step by step walkthough with screen shots, click on the link below: