Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi All,
Help to create a measure to show the default value as for category B in visuals for the first time, any selection happen on category slicer automatically the respective values show show on the visual
Catgory | Slicer Category | ||
A | A | ||
A | B | ||
B | C | ||
B | |||
C | |||
C | Cou t of category | ||
Card Default Value | 2 |
Thanks in advance
Solved! Go to Solution.
Hello @ssk_1984,
Can you please try this approach:
Measure =
VAR SelectedCategory = SELECTEDVALUE('Category'[Slicer Category])
VAR DefaultValue = CALCULATE(COUNTROWS('Category'), 'Category'[Slicer Category] = "B")
RETURN
IF(ISBLANK(SelectedCategory), DefaultValue, CALCULATE(COUNTROWS('Category'), 'Category'[Slicer Category] = SelectedCategory))
Hi @ssk_1984 ,
Did Sahir_Maharaj's workaround help you?
If not, you may refer to this blog:
How to dynamically select the default values we ne... - Microsoft Fabric Community
Or provide us with more details about your requirements, thanks.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @ssk_1984,
Can you please try this approach:
Measure =
VAR SelectedCategory = SELECTEDVALUE('Category'[Slicer Category])
VAR DefaultValue = CALCULATE(COUNTROWS('Category'), 'Category'[Slicer Category] = "B")
RETURN
IF(ISBLANK(SelectedCategory), DefaultValue, CALCULATE(COUNTROWS('Category'), 'Category'[Slicer Category] = SelectedCategory))
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
103 | |
63 | |
45 | |
37 | |
35 |