Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a database connected via direct query with a table that has a resolution column with values '1' or '2', where 1 represents a low resolution and 2 represents a high resolution of the data. In my Power BI dashboard, I currently have a perfectly working dynamic query with an interactive slicer using these numeric values: I created a parameter called ResolutionParameter of type decimal number and have a list of values with '1' or '2'. This parameter is referenced in the M query. I also created a new table named ResolutionTable with the values '1' and '2'. This resolution field is bound to the ResolutionParameter and used in a slicer on my report page. When someone clicks on '1', the data is filtered with the correct selection.
The problem is that '1' and '2' are not very logical or understandable values in a slicer for a user. I would prefer to use the text labels 'low' and 'high'. When I added these values to my ResolutionTable like this ...:
resolution resolution_label
1 low
2 high
... and then used the values 'low' and 'high' in my slicer, the dynamic query stopped working.
How do I ensure that I can use a replacement value in my slicer different from the value I reference in the M query? How can I make my slicer more user-friendly without breaking the underlying query functionality?
Hey, thank you for your answer. Unfortunately I'm not allowed to install any third-party software on my work laptop. Do you think the solution you suggested would also work without using Tabular Editor? I can't seem to find the Group By Columns option
I'm not 100% sure that this will work in your use case, but I have used this method in different scenarios.
Manually edit the DAX generated for your parameter table to add a new column to each row with the resolution label for that value.
If your parameter table is using GENERATESERIES then replace it with
Parameter table =
SELECTCOLUMNS (
{ ( 1, "low" ), ( 2, "high" ) },
"resolution", [Value1],
"resolution_label", [Value2]
)
Open Tabular Editor and select the resolution_label and in the Options section select Group By Columns. Add the resolution column as the group by column, and save your changes.
In the slicer, when you use the resolution_label column the underlying DAX will, I think, actually use the resolution column, which should then pass the numeric value to your query.
I know this works for regular DAX queries, just not sure if it will work in DirectQuery.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
122 | |
80 | |
47 | |
44 | |
35 |
User | Count |
---|---|
183 | |
84 | |
69 | |
48 | |
45 |