Forum Discussion
Anonymous
4 years agoNot applicable
curmonthoffset behavior on q level
HI, I am using the calendar table createdby Avi Singh. I am confused about the behavior of the curmonthoffset column. This is the code for the table: let
/*
****This Calendar was crea...
- Anonymous4 years ago
I found a solution myself:
Cumulative Won MRR = SWITCH( TRUE(), and(SELECTEDVALUE(Dates[CuryearOffset])=0,and(SELECTEDVALUE(Dates[CurmonthOffset])=0,SELECTEDVALUE(Dates[CurQuarterOffset])=0)), 1), 0)
Anonymous
4 years agoNot applicable
Hi Anonymous ,
SELECTEDVALUE() returns the value when the context for column name has been filtered down to one distinct value only. Otherwise returns alternate result. The alternate result is the value returned when the context for column name has been filtered down to zero or more than one distinct value. When not provided, the default value is BLANK().
In short, if there are multiple [CurMonthOffset] for the current row, blank() will be returned. Blank()=0 so measure returns true.
Best Regards,
Jay
Anonymous
4 years agoNot applicable
I found a solution myself:
Cumulative Won MRR =
SWITCH(
TRUE(),
and(SELECTEDVALUE(Dates[CuryearOffset])=0,and(SELECTEDVALUE(Dates[CurmonthOffset])=0,SELECTEDVALUE(Dates[CurQuarterOffset])=0)), 1),
0)