How to create field parameters in Direct Lake models
- 2 minutes read - 232 wordsIn a recent project I had to add field parameters to a Direct Lake model, as currently field parameters can’t be created in the Power BI Service at the moment you have to either use a tool like tabular editor or a recent preview feature in Power BI desktop. However, I found the documentation for this preview feature very patchy so I hope I can provide a clear step by step guide.
Prerequisites
- A direct lake model in the Power BI/Fabric service
- XMLA read/write enabled on the tenant and capacity
- The PBIP and Direct Lake editing preview features
Steps
- Create a new Power BI desktop report
- In the OneLake data hub select your semantic model, make sure you select edit rather than connect
- Export to PBIP by going to File -> Export -> Power BI Project
- Open the new PBIP file, and go to the report tab. From there you should be able to add a field parameter which will then save up to the Power BI Service.
This process is still a bit convoluted but does not require any third party tools which are not always an option. If you run into any issues with this process make sure you have met all the perquisites and that no one else edited the dataset/semantic model while you were creating the PBIP as if the versions don’t match you will get an error.