Forum Discussion
bugs84
8 years agoFrequent Visitor
Calc Column with next working day
Hello everyone, I need to find a way to a dax formula for calculated column in a Calendar table which computes the "next working day" in the same table. Basically i need to get the minimum DATE val...
- 8 years ago
HI bugs84
Hopefully this shall do the job
ThisOrNextWorkingDay = VAR NextWorkingDay = MINX ( FILTER ( TableName, TableName[Day] > EARLIER ( TableName[Day] ) && TableName[IsWorkingDay] = "Y" ), TableName[Day] ) RETURN IF ( TableName[IsWorkingDay] = "N", NextWorkingDay, TableName[Day] )
Zubair_Muhammad
8 years agoCommunity Champion
HI bugs84
Hopefully this shall do the job
ThisOrNextWorkingDay =
VAR NextWorkingDay =
MINX (
FILTER (
TableName,
TableName[Day] > EARLIER ( TableName[Day] )
&& TableName[IsWorkingDay] = "Y"
),
TableName[Day]
)
RETURN
IF ( TableName[IsWorkingDay] = "N", NextWorkingDay, TableName[Day] )bugs84
8 years agoFrequent Visitor
It worked!!
Actually since i have a few rows, i guess removing the "IF" and making the measure a little simpler can be fine too.
Thanks a lot!!
ThisOrNextWorkingDay =
MINX (
FILTER (
ZDate;
ZDate[Date] >= EARLIER ( ZDate[Date] )
&& ZDate[IsWorkingDay] = "S"
);
ZDate[Date]
)