Forum Discussion
Filter Card as per Dropdown Selection
- 3 years ago
Hi , rahul_ferns
You can try to this ,i may make a mistake for this dax code:
Measure = var _select =COUNTROWS(VALUES('Table'[Year])) var _total = COUNTROWS(ALL('Table'[Year])) return IF(_select = _total ,"all",MIN('Table'[Year]))Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Aniya
I only want to show the selected Year from the Slicer, but when all is selected in Slicer it should say the word all
Regards
Rah
Hi, rahul_ferns
Accoridng to your description, you want to "when all is selected in Slicer it should say the word all ".
You can try to use this dax code:
Measure =var _select =VALUES('Table'[Year])
var _total = COUNTROWS(ALL('Table'[Year]))
return
IF(_select = _total ,"all",MIN('Table'[Year]))
hank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- rahul_ferns3 years agoHelper II
Hi Aniya
Thanks for the reply
I tried it, but when I add the measure to a Card Visual, I am getting the Can't display the visual errorRegards
Rahul
- v-yueyunzh-msft3 years agoCommunity Support
Hi , rahul_ferns
You can try to this ,i may make a mistake for this dax code:
Measure = var _select =COUNTROWS(VALUES('Table'[Year])) var _total = COUNTROWS(ALL('Table'[Year])) return IF(_select = _total ,"all",MIN('Table'[Year]))Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- rahul_ferns3 years agoHelper II
Perfect, Aniya
Much appreciated