Forum Discussion
LBarto90
2 years agoRegular Visitor
Summarize a measure
Hey Folks, I have a problem with a data table and cant figure out the problem. It would help me a lot if you have an idea on this issue. There is a data table like this Name date value ...
LBarto90
2 years agoRegular Visitor
"Category" is not a colomn in the data table. "Category" is the value which is Calculated from the measure. So I guess this wont work.
This is the DAX of the measure:
Anzahl krank_Kategorie =
SWITCH(
TRUE(),
[Anzahl krank] <= 3, "bis 3 Tage",
AND([Anzahl krank] > 3, [Anzahl krank] <= 14), "4 bis 14 Tage",
"0"
)
I need this for an absence overview. I want to know how many absence days have been totally spent in the 1-3 days range, 4-10 days range and so on.
Greg_Deckler
Community Champion
2 years agoLBarto90 OK, try this then:
Measure =
VAR __Category = [Anzahl krank_Kategorie]
VAR __Table = SUMMARIZE('Table', [Name], "__Count", COUNTROWS('Table'))
VAR __One2Three = COUNTROWS(FILTER(__Table, [__Count]<4))
VAR __MoreThan4 = COUNTROWS(FILTER(__Table, [__Count]>3))
VAR __Result = IF(__Category = "1-3", __One2Three, __MoreThan4)
RETURN
__Result