Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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 November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 57 | |
| 44 | |
| 42 | |
| 20 | |
| 18 |