Forum Discussion
CS
Advocate I
8 years agoGrand Total Row Count When Using Measures, IF, and FILTER
I want to get the sectors that have increased their hours this month. =IF( [Total Hours] > [Hours LM],
IF(
HASONEFILTER( 'Table B-7'[Super Sector] ),
COUNTROWS( '...
- 8 years ago
Give this a shot
????? = SUMX ( FILTER ( ALLSELECTED ( 'Table B-7'[Super Sector] ), [Total Hours] > [Hours LM] ), CALCULATE ( COUNTROWS ( 'Table B-7' ) ) )
Zubair_Muhammad
Community Champion
8 years agoHI CS
I think Something along the following lines.
?????=
SUMX (
ALLSELECTED ( 'Table B-7'[Super Sector] ),
CALCULATE ( COUNTROWS ( 'Table B-7' ) )
)CS
Advocate I
8 years agoThank you, Zubair_Muhammad.
I just tried it and I am still getting 19, the total of all the super sector rows.
- Zubair_Muhammad8 years ago
Community Champion
Give this a shot
????? = SUMX ( FILTER ( ALLSELECTED ( 'Table B-7'[Super Sector] ), [Total Hours] > [Hours LM] ), CALCULATE ( COUNTROWS ( 'Table B-7' ) ) )- CS8 years ago
Advocate I
That worked, thank you.
I thought measures could not be used in FILTER. I tried using measures in FILTER to no avail. When I read up on it, I found something that said measures cannot be used in FILTER. But look at this, they can.
Thank you again.