Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a fact table that contains the forecasted amount for each initiative. This forecast is done at the start of the year so the value for the forecast appears only in the month of January in the fact table for each year.
The fact table also has the savings per initiative, Success Rate and Initiative Status
Initiative Code | Period | Savings Actuals | Forecast | Success Rate | Reported | Initiative Status | Savings Validated | Indicator |
SAV001 | 1/1/2022 | 80 | 100 | 1 | 80 | Ongoing | 70 | P&L validated |
SAV002 | 1/1/2022 | 50 | 90 | 1 | 50 | Ongoing | 45 | P&L validated |
SAV003 | 1/1/2022 | 100 | 100 | .8 | 100 | Ongoing | 100 | P&L validated |
SAV001 | 2/1/2022 | 20 | 0 | .6 | 20 | Ongoing | 15 | Cashback validated |
SAV004 | 1/1/2022 | 100 | 100 | 1 | 90 | Closed | 90 | Cashback validated |
SAV005 | 1/1/2022 | 60 | 70 | .5 | 50 | Closed | 50 | P&L validated |
I need to calculate the value of forecast as modified using the following logic :
IF (Initiative Status ]='Closed' OR THEN Forecast= Full_year[Reported].
ELSE Forecast = max (Full_year[Reported], [Forecast cell])
Forecast cell is the forecast value from the fact table.
Basis on the above calculation I need to calculate the Forecast Success Rate using the below formula:
IF (Initiative Status ]='Closed') THEN Forecast SR = Forecast ELSE Forecast SR = (Forecast - [Saving Validated])*[Success Rate] + [Saving Validated]
I have tried multiple ways using calculated column and measures but my forecast value is not calculated right. I am not sure which step I am missing.
My measure for forecast success rate is :
if(min(fact savings[INITIATIVE STATUS])="Closed",[Forecast],([Forecast Total]-[Savings validated])*min('FACT SAVINGS'[Success rate])+[Savings validated)).
Not sure though if this is the right approach or not. Since the savings are tracked on a daily/monthly basis. But my forecast is for the entire year.
Solved! Go to Solution.
In my exemple, i ducplicate your field "inititive status" on a calculatedcolumn named "calculated inititive status"
after I store the value of the calculated field in a varioble called statuscalc
here is the code
Store values in variable and it will work
Thanks again but is it not same as
if(min(fact savings[INITIATIVE STATUS])="Closed",[Forecast],([Forecast Total]-[Savings validated])*min('FACT SAVINGS'[Success rate])+[Savings validated)).
Sorry if my understanding is not right , but we cannot use the column with row context in a measure unless we use min, or max type functions.
Can you help me how to go about using variables.
In my exemple, i ducplicate your field "inititive status" on a calculatedcolumn named "calculated inititive status"
after I store the value of the calculated field in a varioble called statuscalc
here is the code
Hello
I hop eI understood well.
Is it what you need ?
@Anonymous thanks for your reply but I cannnot use the if condition in calculate as the [Initiative State] , [Sucess Rate] and [Savings validated] are calculated columns in the fact table.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
55 | |
54 | |
37 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
40 |