Are you looking to add some fun and interactivity to your Power BI reports? Check out the DENEB visual and the Vega language. With these items, you can create a classic PAC-MAN game right within your Power BI report.
To get started, you'll first need to add the DENEB visual into your Power BI report. Deneb is available on AppSource, you can download the visual from the Microsoft AppSource marketplace and importing it into your report or click "Get More Visuals" in the "Visualizations" pane and search for "DENEB".
![How to add the DENEB visual to a Power BI Report](https://static.wixstatic.com/media/eb50dd_d2350f4ce1294761a8629b30d9bb3b6e~mv2.gif)
Once you have added Deneb to your report,you can then click the visual to add it to the report canvas. Add a column or a measure to Deneb's Values data role and then you can now open the Visual Editor by selecting the visual header (...) and then Edit. As a result, the Visual Editor will be in focus mode, and the dialog box for creating a new specification will be displayed. On the "Create New Specification" dialog select Vega tab and then select [empty] and click on create:
![How to set the DENEB visual with VEGA language](https://static.wixstatic.com/media/eb50dd_c4700e88d1ba421989034d09b6fd5534~mv2.gif)
Now, you need to copy the Vega JSON Specification from visual examples on the Vega website and paste the code in DENEB visual's specification section. To do this, go to the Vega Language website and click on the examples: https://vega.github.io/vega/examples/. Scroll down to the bottom to find the Pacman, click on it and in the Pacman example page, scroll down to see the "Vega JSON Specification" and copy the entire code.
This code has been created by Mathias Tiberghien and he expained it very well on this blog post: https://observablehq.com/@mathiastiberghien/how-to-create-a-pacman-game-with-vega
![Pacman on the Vega language website](https://static.wixstatic.com/media/eb50dd_718866a41d1d4e7089b75b9633b57897~mv2.gif)
Be sure to remove all default code from the specification section on the visual editor of DENEB visual and then paste the code there. Press Ctrl + Enter or click on the apply button and you will see the game:
Now it's ready, click on Back to report to bring you back out of focus mode and to the report canvas.
![add code from vega website to the Deneb visual and run the pacman game on Power BI](https://static.wixstatic.com/media/eb50dd_fc9d944b1a5d45f3a57d3bbf87851b86~mv2.gif)
Adjust the size of the visual and have fun with the game!
You can then create some bookmarks and assign them to buttons to play and hide the game. 😎 Download the sample file: https://github.com/VahidDM/Sample-Files/blob/main/PACMAN%20Report.pbix
Comments