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
Anonymous
Not applicable

Cost performance Index calculation

Hello,

 

I am new to power BI pls bear with me. I am trying to calculate Cost performance Index of a project within a fiscal year. Some of the project have a value of "0" for a specific month and some are just "blank". What I want to accomplish:

 

1. I want to be able to filter the blank and the "0".

2. The formula of the CPI is:

("Blank" month/"0" month) * (Monthly savings/YTD savings)

3. Based on the calculation above, I want to show:

CPI <1 over budget
       >1 under budget

       =1 on budget

 

Thanks for checking this out and I appreciate any help.

1 ACCEPTED SOLUTION
VishalJhaveri
Resolver III
Resolver III

Hi @Anonymous 
Please try this following measure and let me know if you're able to achieve the required scenario.

Test Measure =
VAR BlankValue = CALCULATE(COUNT(AnyColumn), Value = BLANK())
VAR Zeromonth = CALCULATE(COUNT(AnyColumn), Value = 0)
VAR CPI =
DIVIDE(BlankValue, ZeroMonth, 0) * DIVIDE(Monthly Savings, YTD Savings, 0)
RETURN
SWITCH(TRUE(),
CPI<1, "Over Budget",
CPI>1, "Under Budget",
CPI=1, "On Budget"
)

I hope it works.
Thank you.

View solution in original post

3 REPLIES 3
VishalJhaveri
Resolver III
Resolver III

@Anonymous Did my answer help you to resolve your query?

Anonymous
Not applicable

@VishalJhaveri Thanks for the quick reply! I will try this out and will let you know. Thanks again 🙂

VishalJhaveri
Resolver III
Resolver III

Hi @Anonymous 
Please try this following measure and let me know if you're able to achieve the required scenario.

Test Measure =
VAR BlankValue = CALCULATE(COUNT(AnyColumn), Value = BLANK())
VAR Zeromonth = CALCULATE(COUNT(AnyColumn), Value = 0)
VAR CPI =
DIVIDE(BlankValue, ZeroMonth, 0) * DIVIDE(Monthly Savings, YTD Savings, 0)
RETURN
SWITCH(TRUE(),
CPI<1, "Over Budget",
CPI>1, "Under Budget",
CPI=1, "On Budget"
)

I hope it works.
Thank you.

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.