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
difrenkel
New Member

calculating NPV

I want to compute XNP for two projects, each with its own discount rate.

I have two tables:

 - tblCashFlows with clomns: date | project | values

 - bplRate with two column: project | rate

 

Formula should be

VPL = XNPV(tblCashFlows,tblCashFlows[Values],tblCashFlows[Date],XXXXX)

 

XXXXX should bring the discount value from tblRate.

 

What to write in XXXXX?

 

tblCashFlows

DateProjectValue
31-01-17Project1100
02-03-17Project1100
01-04-17Project1100
01-05-17Project1100
31-05-17Project1100
30-06-17Project1100
30-07-17Project1100
29-08-17Project1100
28-09-17Project1100
28-10-17Project2100
27-11-17Project2100
27-12-17Project2100
26-01-18Project2100
25-02-18Project2100
27-03-18Project2100
26-04-18Project2100
26-05-18Project2100
25-06-18Project2100
1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

Hi @difrenkel

 

Try one of these to get the rate

 

Calculate(values(tblRate[Rate]),Filter(tblRate,tblRate[Project]=SELECTEDVALUE(tblCashFlows[Project])))

 

OR

 

LOOKUPVALUE(tblRate[Rate],tblRate[Project],SELECTEDVALUE(tblCashFlows[Project]))

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

Hi @difrenkel

 

Try one of these to get the rate

 

Calculate(values(tblRate[Rate]),Filter(tblRate,tblRate[Project]=SELECTEDVALUE(tblCashFlows[Project])))

 

OR

 

LOOKUPVALUE(tblRate[Rate],tblRate[Project],SELECTEDVALUE(tblCashFlows[Project]))

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.