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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
2_Flash
Regular Visitor

NPV with dynamic value selection

Hi,

 

I'm trying to develop an investment review model where users can easily select initial investment values, tax rates, and other parameters to dynamically calculate the NPV. I've created a basic table for cash flows, and the calculations work fine. However, the challenge is that the values—such as investment amounts and tax rates—must be entered manually. Ideally, I'd prefer to use parameters, but they're not working with the table format.

 

Hopefully someone can assist with a simple solution.

 

Below is my table that calculates NPV: The Net Income value is calculated in the table 

 

2_Flash_0-1724449534497.png

 

 

Net income =
var genvalue=[Generation value]
var incomerate=[Income rate]
var taxrate=[Tax rate]
var degrate=[Degration rate]
var income=genvalue*incomerate-100*degrate*(Cashflow[ID]-1)
var expense=income*taxrate
return if(Cashflow[ID]=0,[Initial Investment],income-expense)
 
DAX that needs to be selected dynamically:
Initial Investment = -3000
Tax rate = 0.19
 
Link to the PBIX model
1 ACCEPTED SOLUTION

but I need to go into Powerquery each time I need to change a value.

No, you can do that directly in Power BI, via "Edit Parameters"

 

lbendlin_0-1724455018203.png

 

View solution in original post

4 REPLIES 4
2_Flash
Regular Visitor

Thanks for your repsonse:

1) Re: Power BI does not support manual entry by default (some third party visuals do). - Prefer to stick to standard PowerBI

2) Re:Change the Power Query Parameter to "Enable Load"  and it changes from an expression to a partition and will be accessible in Power BI. - Yep, did that, but I need to go into Powerquery each time I need to change a value.  Probably not feasible for a group of users.

but I need to go into Powerquery each time I need to change a value.

No, you can do that directly in Power BI, via "Edit Parameters"

 

lbendlin_0-1724455018203.png

 

Gotcha! Ok, I'll play around with this concept. Thank you

lbendlin
Super User
Super User

the challenge is that the values—such as investment amounts and tax rates—must be entered manually. 

Power BI does not support manual entry by default (some third party visuals do).  The standard functionality is limited to "What-if?" parameters with a range of max 1000 discrete values

 

I'd prefer to use parameters, but they're not working with the table format.

They will if you let them.  Change the Power Query Parameter to "Enable Load"  and it changes from an expression to a partition and will be accessible in Power BI.  You can also modify Power Query parameter values from the Power BI menu, but then you will need to manually initiate a refresh for the change to take hold.  Not something your report users can do.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors