Forum Discussion
rschaudhr
Resolver II
5 years agoDefault value when no filter selected
I have a case where I have the following data: There is a slicer based on the department. When Finance is selected in the slicer, another visual will display the comments related to finance...
- 5 years ago
Hi rschaudhr,
You should use a measure similar to the one below:
Comments selection = IF ( ISFILTERED ( CommentsTable[Department] ), SELECTEDVALUE ( CommentsTable[Comments] ), CALCULATE ( SELECTEDVALUE ( CommentsTable[Comments] ), FILTER ( ALL ( CommentsTable[Department], CommentsTable[Comments] ), CommentsTable[Department] = "Investments" ) ) )
rschaudhr
Resolver II
5 years agoMFelix ,
So below are a few senario:
1) when no filter is selected in department slicer, only investment comment will show.
2) when HR filter is selected in department slicer, only HR comment will show.
3) when HR and IT filter is selected in department slicer, then HR and IT comments will show.
4) when HR, IT and Operation filter is selected in department slicer, then HR, IT and operation comments will show.
5) when All filter is selected in department slicer, then all comment will show.
I hope these senarios help.
Thank you!
MFelix
Super User
5 years agoCorrect for all of them.