Forum Discussion
Wecks
7 years agoFrequent Visitor
Date Function (DAX)
I am after a DAX function I can enter into a new collumn into my Dataset that will look at a data field in the same dataset and will give me a date value 2 days from that date. The kicker is i ...
- 7 years ago
You may check the DAX below.
Column = VAR d = USERS[HDATE] RETURN MINX ( FILTER ( USERS, DATEDIFF ( d, USERS[HDATE], DAY ) >= 2 && NOT ( WEEKDAY ( USERS[HDATE] ) IN { 1, 7 } ) ), USERS[HDATE] )
v-chuncz-msft
7 years agoCommunity Support
You may check the DAX below.
Column =
VAR d = USERS[HDATE]
RETURN
MINX (
FILTER (
USERS,
DATEDIFF ( d, USERS[HDATE], DAY ) >= 2
&& NOT ( WEEKDAY ( USERS[HDATE] ) IN { 1, 7 } )
),
USERS[HDATE]
)
Wecks
7 years agoFrequent Visitor
Thanks for this, there is only one issue i am seeing and that is that if a day is monday for example i have a HDate that is the 10th od December it is giving me a date of the 14th which is four days not 2 days passed the HDATE, do you know why that would be?