Forum Discussion
Celador
8 years agoFrequent Visitor
DAX - countif after grouping
Hi, I need a series of measures to group some results by two columns and then count specific results in the 3rd column - and I'm very very new to Power BI and DAX. I've done a bunch of googling, re...
- 8 years ago
Hi Celador
Try these MEASURES as well
Red = COUNTROWS ( FILTER ( SUMMARIZE ( Table1, Table1[UserId], Table1[ResponseId], Table1[Result] ), Table1[Result] = "Red" ) )And
Blue = COUNTROWS ( FILTER ( SUMMARIZE ( Table1, Table1[UserId], Table1[ResponseId], Table1[Result] ), Table1[Result] = "Blue" ) )
Celador
8 years agoFrequent Visitor
Is there no way to write a single measure that will result in the Answer of 3 & 2?
Abduvali
Skilled Sharer
8 years agoYou IF statement, create new column:
Column = if(Sheet2[Level] = "red",
CALCULATE(COUNT(Sheet2[level]),Sheet2[Level] = "Red"),
CALCULATE(COUNT(Sheet2[level]),Sheet2[Level] = "Blue")
)