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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors