Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Is this possible to be done in powerbi?
Example in forecasting:
In 2020 I have 50, dashboard filter 5% to the number for the following forecast years.
Start of forcasting and the expected result:
in
2020: 50
2021 : 50-(50*0.05) = 48
2022: 48 - (48*0.05) = 46
2023: 46 - (46*0.05) = 44
.
.
2025
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, you could create what-if parameter, then create measure (based on the what-if parameter); the following formula to create a measure :
Step 1: Add what-if parameter(Percentage)
Step2: Add measure(Value)
Value =
VAR _a =
MAX ( 'Table'[Year] ) - 2020
RETURN
CALCULATE (
MAX ( 'Table'[Sales] ) * ( 1 - [Percentage Value] ) ^ _a,
ALL ( 'Table' )
)The final output is shown below:
Best Regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You could modify the measure by the following:
value =
VAR _a =
MAX ( 'Table'[Year] ) - 2020
RETURN
CALCULATE (
MAX ( 'Table'[Sales] ) * ( 1 - [Percentage Value] + [scenario Value] ) ^ _a,
ALL ( 'Table' )
)
The final output is shown below:
Best Regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, you could create what-if parameter, then create measure (based on the what-if parameter); the following formula to create a measure :
Step 1: Add what-if parameter(Percentage)
Step2: Add measure(Value)
Value =
VAR _a =
MAX ( 'Table'[Year] ) - 2020
RETURN
CALCULATE (
MAX ( 'Table'[Sales] ) * ( 1 - [Percentage Value] ) ^ _a,
ALL ( 'Table' )
)The final output is shown below:
Best Regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yalanwu-msft, thanks for your solution!!
what if the scenario is like - i have 2 what-if parameters, attrition 5% and recruitment 3%
2020:52
2021: 52- (52*5%)+(52*3%) = 51
2022: 51-(51*5%)+(51*3%) = N
20233:N-(N*5%)+(51*3%)=N
.
.
You could modify the measure by the following:
value =
VAR _a =
MAX ( 'Table'[Year] ) - 2020
RETURN
CALCULATE (
MAX ( 'Table'[Sales] ) * ( 1 - [Percentage Value] + [scenario Value] ) ^ _a,
ALL ( 'Table' )
)
The final output is shown below:
Best Regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @CNENFRNL, thanks for your input.
My Question - if the 5% is based on the what-if parameter, can it still be populate using the script you share?
@Anonymous , simply an algbra question,
f(n)=f(n-1)*(1-0.05)=f(n-2)*(1-0.05)^2= ... =f(0)*0.95^nlet
Source = Table.FromList({2020..2025}, Splitter.SplitByNothing(), {"Yr"}),
Yr2020 = 50,
#"Added Custom" = Table.AddColumn(Source, "Forecast_PQ", each Number.RoundUp(Yr2020 * Number.Power(.95, [Yr]-2020)))
in
#"Added Custom"
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 50 | |
| 44 | |
| 42 | |
| 19 | |
| 19 |
| User | Count |
|---|---|
| 69 | |
| 68 | |
| 33 | |
| 32 | |
| 32 |