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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
metcala
Helper III
Helper III

Using an IF statement within a measure

Hi all

 

I have been doing a bit of digging around on the forum to try and find a solution but can't seem to get this working.

 

I currently have two separate measures that are individually working:

  • The first apportions the annual planned workload by month an applies a factor for months with down time.
  • The second takes the fixed expected days and deducts the total from the first measure to calculate the non-working days.

 

I would like both of these to be displayed in a single matrix and think this needs to be combined into a single measure but can not get it working.

 

Data Structure

Plan Table

Employee ID

Activity

Days allocated

 

Staffing Table

Employee ID

Employee name

Start Date

End Date

FTE

Months Present (Calculated Column)

 

Current Measures

 

 

April = CALCULATE(
   SUMX('Staffing',((12/SUM('Staffing'[Months Present]))*0.065)*SUM('Plans'[Days])),
   FILTER('Plans','Plans'[Activity]<>"Leave"))

 

 

 

April Leave = 21.67 - 'Plans'[April]

 

 

Expected Outcome

 

ActivityAprilMayJuneJuly AugustSeptemberetc
Corporate10      
Development5      
Training5      
Leave1.67      
Total21.67      

 

 

Any help would be much appreciated.

0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors