Forum Discussion
slicer no selection
- 7 years ago
Hi Anonymous,
I have modified my formula with countProd, you could refer to it:
countProd = IF(ISFILTERED(Sheet7[Product]),DISTINCTCOUNT(Sheet7[Product]),IF(ISBLANK(SELECTEDVALUE(Sheet7[Product])),0))
Result:
Hope it could help you.
Regards,
Daniel He
Hi v-danhe-msft
I manage to open your power bi file, and it results that the difference between your solution and mine is that I need that the user can select ONE or multiple answers (countries in my case or products in the case you reproduce). so when I change the slicer into off "single select" then I still don't get the counts that I want using either the first count or the second one. WHen nothing is selected there is always the total number that appears and not 0.
I would like to have an IF condition about if nothing is selected but apparently isblank(isselected()) is not the right one, cause isselected works for a single selection.
Thanks for your further help!
Hi Anonymous,
I have modified my formula with countProd, you could refer to it:
countProd = IF(ISFILTERED(Sheet7[Product]),DISTINCTCOUNT(Sheet7[Product]),IF(ISBLANK(SELECTEDVALUE(Sheet7[Product])),0))
Result:
Hope it could help you.
Regards,
Daniel He
- Anonymous7 years agoNot applicable
It works thanks a lot!
Would you tell me which power bi version do you have?
Because your pbix file can't be opened using my version,
Thanks again!
Regards,
- v-danhe-msft7 years ago
Microsoft Employee
Hi Anonymous,
Here is my version: 2.62.5222.601 64-bit (September 2018)
Hope it could help you.
Regards,
Daniel He