Forum Discussion
How to use a multiple filter on the same column
hello ,
I need your help to optimize my work …
I will give you the below table to explain my problem
Table :
columnA columnB column
A A A
A B B
B B C
C C D
From this table I need to calculate for each column the count of A , B and C
So I use this measure to calculate the number of “A” on columnA
measure= (CALCULATE(COUNT(Table [columnA ]);FILTER(Table; Table[columnA ]="A")))
Can you please help me if there is any other possibility to regroup filter on the same measure …
Best Regards
hi cs_skit
Maybe you don’t understand me but with your example you give me what I need ..
Just I need to add {in}
measure= (CALCULATE(COUNT(Table [columnA ]);FILTER(Table; Table[columnA ] IN{"A";"B")))
And now I can do many filter on the same column
thanks :)
8 Replies
- cs_skitResolver IV
does this work:
CountAinAllCols =
CALCULATE(COUNTROWS(ABCtable);ABCtable[ColumnA]="A") +
CALCULATE(COUNTROWS(ABCtable);ABCtable[ColumnB]="A") +
CALCULATE(COUNTROWS(ABCtable);ABCtable[ColumnC]="A")- cs_skitResolver IV
Yeah sorry you need independent of current filter context
CountAinAllCols =
COUNTROWS(FILTER(ALL(ABCtable);[ColumnA]="A")) +
COUNTROWS(FILTER(ALL(ABCtable);[ColumnB]="A")) +
COUNTROWS(FILTER(ALL(ABCtable);[ColumnC]="A"))