Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I've been watching this tutorial on how to make a preset value button panel for certain date ranges
https://www.youtube.com/watch?v=nocsNBF_NkE
The Sample File is here: https://github.com/MarkWilcock/lbag-online/tree/master/M%26G%20Results
I've succesfully implemented it, but I'm having trouble adding the Measure as a Filter in the Card Visuals
When I try to click on the options there to choose "is" it doesn't open up.
Is this a bug? Is there a way to implement this feature to cards as well?
Thank you!
Solved! Go to Solution.
Hi @Caesarul ,
Here I download your sample to have a test and I could reproduce your issue. You can see that I count [Date] in card visual and I try to add [Preset Value] in it as a visual level filter, it doesn't work.
As far as I know, measure need to be expand in other visuals like table/matrix or charts. Card visual will only return a single value, so measure filter may not support.
So I suggest you to create a new measure and add [Preset Value] =1 in filter field in your code.
Measure = CALCULATE(COUNT('M&G'[Date]),FILTER('M&G',[Preset Value] = 1))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Caesarul ,
Without sample, we can guess
Is 'Preset' value a number? My assumption it is a true/falsevalue, not a number. Wrap the formula with INT() to get a number.
Hope this help.
The Sample File is here: https://github.com/MarkWilcock/lbag-online/tree/master/M%26G%20Results
The Measure for Preset Value is:
Hi @Caesarul ,
Here I download your sample to have a test and I could reproduce your issue. You can see that I count [Date] in card visual and I try to add [Preset Value] in it as a visual level filter, it doesn't work.
As far as I know, measure need to be expand in other visuals like table/matrix or charts. Card visual will only return a single value, so measure filter may not support.
So I suggest you to create a new measure and add [Preset Value] =1 in filter field in your code.
Measure = CALCULATE(COUNT('M&G'[Date]),FILTER('M&G',[Preset Value] = 1))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you @v-rzhou-msft !!! That's brilliant !!! I'll try it out and follow-up as soon as possible.
Do you have any idea if I can sync the Preset Code panel with my Date Slicer?
I want to give my stakeholders the opportunity to use the preset codes and the date slicer as well (if they need to), but they seem to filter one another instead of syncing.
I've opened another thread here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Sync-Preset-Date-Value-with-a-Date-between-Sl...
Thanky a lot! This is the 2nd time you save me !!!
Try changing the formula like this
"1M", IF(daysDiff < 31, 1,0), and so on.
"1M", IF(daysDiff < 31, 1) => if preset code= "1M", if daysdiff = 31 for example then preset value = false!!!
how many rows in preset value? blank row?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
26 | |
20 | |
14 | |
8 |
User | Count |
---|---|
75 | |
50 | |
47 | |
17 | |
17 |