Forum Discussion
Sla5ha
5 years agoFrequent Visitor
DAX HELP - How to implement dynamic totals when conditionally aggregating
Hi there, Was wondering if someone could help.. I have the following DAX Expression: _UsageLastXDays =
VAR MinUsageDate =
CALCULATE ( MIN ( Dates[DateISO] ), GameUsage )
RETURN
IF (
...
Sla5ha
5 years agoFrequent Visitor
Thanks Pat,
Much appreciated for your swift response.
I implimented this and it is still not producing totals. What am I doing wrong?
_AltUsageLastXDays2 =
VAR Usage = [_UsageLastXDays]
RETURN
IF(ISINSCOPE(B),
sumx(values(A),usage),
sumx(SUMMARIZE(GameUsage,A,B),
Usage)
)
What happens if I want to expand to more than A + B with C being an unknown? Is this possible?
mahoneypat
Microsoft Employee
5 years agoI assume A and B in your expression are actual Table[Column] names. Also, the way you are using the variable will not be calculated dynamically for each row of the virtual table (Values and Summarize). You need to put your [_UsageLastXDays] there instead.
Regards,
Pat