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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How do I make a chart dynamically change based on a data set with a user input?

I have a table with the amount of power usage and cost per month for the last 2 years.

 

I want to look at projecting how much it would cost for the next few years based on a user input (by using a parameter) from a percentage.

 

For example, in January 2021 - 1021 Volts were used and costs $1200, and in Febraury 2021 - 1202 Volts were used and costs $1400.

Example table:

MonthVoltage UseCost
January 202110211200
February 202112021400
etc...etc...etc...

Then the user will input a 5% voltage use increase for the next year (by using a parameter), I want to see the 5% increase on the voltage and costs for those months. I want the line chart to show those new values based on the 5% increase of the values in the table from 2021 to present.

 

Is there a DAX formula to create this kind of calculations and work with a user input?

 

Still a newbie so any help would be appreciated.

 

Thank you!

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Something like this with help from date table for 2021 onward 

 

Year behind Cost= CALCULATE(SUM(Table[Cost]),dateadd('Date'[Date],-1,Year)) *1.05


Year behind Cost= CALCULATE(SUM(Table[Cost]),SAMEPERIODLASTYEAR('Date'[Date]))*1.05

 

You can merge two column based on today

 

if(max(Date[Year]) < Year(Today()) , SUM(Table[Cost]) ,[Year behind Cost])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.