Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi all,
I need some help with a dax formula which combines two true/false measures.
Variables:
Is This ISO_Year = IF(VALUE(Calender[ISO_Year]) = VALUE(YEAR(TODAY())), True, False)
True if the selected date value is in the current ISO year. Else False.
Is before This Week = IF(VALUE(Calender[ISO_WeekNumber]) < VALUE(Calender[Current ISO_Weeknumber]), True, False)
True if the selected date value is before this week. Else False.
Results for those combined below (current date 23-7-2020 = week 30; translation: waar=true, onwaar=false)
Now I'm struggling combining these two variables. I would like to create the value "Is this week & ISO year".
In other words:
IF:
Current ISO year = true
Before this week = false
THEN:
True
ELSE:
False
I've tried nesting the above formulas, but I haven't succeeded yet. Can anyone help me out?
Solved! Go to Solution.
@Anonymous - Should be:
Column = IF([Current ISO Year] && NOT([Before this week]),TRUE(),FALSE())
Hi @Anonymous ,
Try creating a calculated column as follows:
IF ([Is This ISO_Year] = TRUE() && [Is before This Week] = FALSE(), TRUE(), FALSE())
Thanks,
Pragati
Thanks for the very quick responses! Both solutions work great!
I was making it way to complicated with nesting both individual If-fomulas. I'm kind of wondering though what I should have done to make it work with a nested if construction. I felt like I was close, but in the end I kept getting errors.
HI @Anonymous ,
Sometimes that happens when we overcomplicate DAX after working for a long time on it.
But there is always an easier way of writing them 🙂
Thanks,
Pragati
Hi @Anonymous ,
Try creating a calculated column as follows:
IF ([Is This ISO_Year] = TRUE() && [Is before This Week] = FALSE(), TRUE(), FALSE())
Thanks,
Pragati
@Anonymous - Should be:
Column = IF([Current ISO Year] && NOT([Before this week]),TRUE(),FALSE())
User | Count |
---|---|
83 | |
69 | |
68 | |
65 | |
54 |
User | Count |
---|---|
93 | |
93 | |
91 | |
76 | |
69 |