Forum Discussion
Projection based on numeric parameters
- 1 year ago
Hi Thigs ,
To get more accurate projections, I’d suggest using a dynamic DAX calculation that responds to your input parameter. You can use something like SWITCH() or IF() in your measure to handle different values of the parameter.
For example:
Projected Value =
SWITCH(
TRUE(),
[Parameter] = 1, [Value] * 1.1,
[Parameter] = 2, [Value] * 1.2,
[Parameter] = 3, [Value] * 1.3,
[Value]
)
This way, the projections will automatically adjust depending on the input selected. It’s a flexible method and easy to maintain if you plan to add more conditions later. Also, just a quick tip if you're working with a large dataset, try to avoid using calculated columns unless necessary. Measures are generally more performance-friendly in such cases.
Please feel free to come back if you have any queries.
Thank you.
Hi Thigs ,
You’re absolutely right the example I provided uses a static StartValue from the parameter table and doesn’t reference your [Total Year 1 Costs] formula.
To incorporate your measure, simply update the measure by replacing this line:
VAR StartValue = CALCULATE(MAX(ProjectionParams[Value]), ProjectionParams[Parameter] = "StartValue")
with:
VAR StartValue = [Total Year 1 Costs]
This change ensures the projection logic is applied directly to your calculated cost. Make sure your [Total Year 1 Costs] measure returns accurate, context-dependent results, especially when filters like category, year, or month are involved. That way, your projections will stay precise.
Best regards,
Tejaswi.
Community Support Team
This is getting SO close! My only issues is that it is showing a very set pattern of increase and decline. I do not want it to decline at all. I want it to increase based on the growth projected each year on a slicer, so that the business user can select 5%, 7%, 10%, etc. I also need it to be over years, not months, but I think if I change the months to years that should work.