Forum Discussion
appsac1
3 years agoHelper I
Count
Hello, I have created a simple table where measure Count_Lost2 = if([Last_Sales]==BLANK(),1) I want to count this coulmn. Is it not possible to count measures? Thanks for any ...
- 3 years ago
You need to create a variable to hold the values at the granularity you want, then you can run SUMX over that. If you wanted it at year level you could use something like
Count of measure = VAR SummaryTable = ADDCOLUMNS ( VALUES ( 'Date'[Year] ), "@value", [Measure to count] ) RETURN SUMX ( SummaryTable, [@value] )
johnt75
3 years agoSuper User
You need to create a variable to hold the values at the granularity you want, then you can run SUMX over that. If you wanted it at year level you could use something like
Count of measure =
VAR SummaryTable =
ADDCOLUMNS ( VALUES ( 'Date'[Year] ), "@value", [Measure to count] )
RETURN
SUMX ( SummaryTable, [@value] )