Forum Discussion
SebKaliVith
8 years agoRegular Visitor
IF column filtered then
Hi everyone ! Here is how the data look like in my report : NAME X Y Z A 3% 10% B 1% 7% A 5% 6% B 1% 11% C ...
- 8 years ago
Hi SebKaliVith
See the revised file here
I just changed selectedvalue to sum
Measure = IF ( COUNTROWS ( ALLSELECTED ( TableName[NAME] ) ) = COUNTROWS ( ALL ( TableName[NAME] ) ), SUM ( TableName[x] ), SUM ( TableName[y] ) )
SebKaliVith
8 years agoRegular Visitor
It's perfect, i succeed to do whait i wanted with your help.
Thanks a lot for all.
Juste a small question for my personal understanding of the solution :
To detect if column "NAME" was filtered or not, i created a measure "IsFiltered" which whas :
IF(ISFILTERED[NAME]);"1";"0")
This formule was good because, when i display the measure in a card, it switched good between 1 and 0 when i filtered.
But when i write :
IF(ISFILTERED[NAME];SELECTEDVALUE[Y];SUM[X])
Thes formule doesn't work.
Any idea of why ?
Thanks
Zubair_Muhammad
Community Champion
8 years agoHi SebKaliVith
This is interesting. I will explore this and get back to you
This is a good reference for ISFILTERED functions