Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
A simple DAX formula is giving me a headache, I have a Table, showing various project related data, one field being the date the project was last updated, formatted as a date field, dd/mm/yyyy.
This was a new field, so the initial check was to see whether it was blank or had a date in, all worked fine and it set the "WeekCheck" field to 1 if blank/more than 6 days old or 0 if the date was present and was for this week. This WeekCheck is used to drive conditional formatting of the report.
All good so far . . . however then the report needed presenting to senior management, who didn't need to see the format shading for projects not updated, so I added a Weekday check to the formula and that's where it all went wrong. We only need the code set if it is a Tuesday, when we review with the Project Managers, at all other times it shouldn't be set and the conditional formatting doesn't kick in. Original code and then new, failing code, in that it sets 1 for everything
WeekCheck = if(
ISBLANK(Projects[WeekCommencing])||
Projects[WeekCommencing]<(TODAY()-6),
1,
0)
WeekCheck = IF(
AND(
WEEKDAY(TODAY()=3),
OR(
ISBLANK(Projects[WeekCommencing]),
Projects[WeekCommencing]<(TODAY()-6))),
1,
0)
I've tried laying it out in Excel and get it working perfectl, but when I try in DAX it says NO !
Would be so grateful if this can be resolved
Regards
Fred
Solved! Go to Solution.
@Anonymous , the Second formula has an issue on the position =3
WeekCheck = IF(
AND(
WEEKDAY(TODAY())=3,
OR(
ISBLANK(Projects[WeekCommencing]),
Projects[WeekCommencing]<(TODAY()-6))),
1,
0)
See if this can help
Hi @amitchandak once again you save the day, so obvious when you point it out. Thanks for the solution 🙂
@Anonymous , the Second formula has an issue on the position =3
WeekCheck = IF(
AND(
WEEKDAY(TODAY())=3,
OR(
ISBLANK(Projects[WeekCommencing]),
Projects[WeekCommencing]<(TODAY()-6))),
1,
0)
See if this can help
Hello @amitchandak
Not sure why this has been moved to the Spannish language site, I accepted as solution on original posting and am unable to accept it here.
Hi @amitchandak once again you save the day, so obvious when you point it out. Thanks for the solution 🙂