Forum Discussion
How to use a multiple filter on the same column
does this work:
CountAinAllCols =
CALCULATE(COUNTROWS(ABCtable);ABCtable[ColumnA]="A") +
CALCULATE(COUNTROWS(ABCtable);ABCtable[ColumnB]="A") +
CALCULATE(COUNTROWS(ABCtable);ABCtable[ColumnC]="A")
hi cs_skit
Thanks for your answer but I need to calculate each column separately by regrouping the filter
Like this for example :
measure= (CALCULATE(COUNT(Table [columnA ]);FILTER(Table; Table[columnA ]="A"& “B” )))
but it don't work ..
thanks
- cs_skit9 years ago
Resolver 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"))- mellas_k9 years ago
Helper I
hi cs_skit
Thanks for your answer ,but probably you don’t understand my request .. I need to applicate multiple filter for each column I can use this measure: measure= (CALCULATE(COUNT(Table [columnA ]);FILTER(Table; Table[columnA ]="A")))
it’s work but in my real table I have 52 column , and for each column I have 3 group of filter ..
So I need to optimize my work ..
thanks
- cs_skit9 years ago
Resolver IV
you are right I seem to be too stupid to understand what you want to do
maybe this?
CountSpecialinAllCols =
COUNTROWS(FILTER(ALL(ABCtable);[ColumnA] IN{"A";"B"})) +
COUNTROWS(FILTER(ALL(ABCtable);[ColumnB] IN{"A";"B";"XYZ"})) +
COUNTROWS(FILTER(ALL(ABCtable);[ColumnC] IN{"B";"C";"uniquestuff"}))