Forum Discussion
UserSam123
2 years agoHelper I
Distinctcount with sum filter
Hello everyone, I need your help with the following problem. In the table below I would like to create a measure that gives me a separate count when the sum of the number column is less than 20....
- 2 years ago
For your information, I succeeded in doing this:
VAR __tmpTable = SUMMARIZE(Table,Table[Name] ,"__Brands",SUM(Table[Quantity]))RETURN CALCULATE(DISTINCTCOUNT(Table[Name]), FILTER(__tmpTable, [__Brands]<20))
Dangar332
2 years agoResident Rockstar
hi, UserSam123
try below
just adjust your table name
output =
var a =ADDCOLUMNS(
SUMMARIZE('Table','Table'[date],'Table'[name]),
"d",CALCULATE(SUM('Table'[number]))
)
RETURN
COUNTX(FILTER(a,[d]<20),'Table'[name])