Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
JemmaD
Helper V
Helper V

Help with measure

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 ) )

 

 

1 ACCEPTED SOLUTION
JemmaD
Helper V
Helper V

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

View solution in original post

1 REPLY 1
JemmaD
Helper V
Helper V

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors