Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have two true/false columns in my data:
SCHEDULE_ACTIVE
SCHEDULE_ACHIEVED
I have created measures to countrows where each is TRUE to get a 1 or a null value.
However, for Schedule Achieved, I want it to give me a 0 value if Schedule Active for that row is TRUE so it's really clear when the Schedule has NOT been Achieved. I also need this to create conditional icons.
I tried some DAX but it's not working.
What i'm trying say is:
If SCHEDULE_ACTIVE is TRUE, then 1 else 0
then countrows of SCHEDULE_ACHIEVED = TRUE if SCHEDULE_ACTIVE is 1, else 0
Then I would hope the result is:
1 for Schedule Active = TRUE + schedule achieved = TRUE
0 for Schedule Active = TRUE + Schedule Achieved = FALSE
null for Schedule Active = FALSE + Schedule Achieved = FALSE
This is my DAX, please can you help me?
Schedule Items Achieved =
VAR Schedule_Active = SUMX('Schedule of Services', IF ('Schedule of Services'[SCHEDULE_ACTIVE]=TRUE(), 1, 0 ) )
VAR Schedule_Achieved = CALCULATE(COUNTROWS('Schedule of Services'), 'Schedule of Services'[SCHEDULE_ACHIEVED]=TRUE() )
RETURN
CALCULATE ( Schedule_Achieved , IF ( Schedule_Active = 1 , 0 ) )
Solved! Go to Solution.
As I got no response to this I created a case when statement in the sql to override the true false column with the values I needed
As I got no response to this I created a case when statement in the sql to override the true false column with the values I needed