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
Nino1
Frequent Visitor

Creating Calculation using Selected Value function

Hello Everyone,

It's not been a long time I started using Power BI and need your help.

I have two measures: "sum of portfolio with nominal values" and "sum of portfolio with adjusted currency value". Also, I have Slicer filter called Currency adjustment that has 2 values: "Yes" and "No" and  I want to create vizualization so that if I select filter and choose "Yes" , "sum of portfolio with adjusted currency value" should be shown on vizualization and  if I select filter and choose "No", "sum of portfolio with nominal values"  should be shown on vizualization.

I tried to create a measure using selectedvalue function but could not deal with it. Could you please help how can I solve this problem?

 

Thank you 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Use the below dax it will work

VAR SelectedValue = SELECTEDVALUE(CurrencyAdjustment)

RETURN
SWITCH(
SelectedValue,
"Yes", SUM('Portfolio'[AdjustedCurrencyValue]),
"No", SUM('Portfolio'[NominalValue])
)

View solution in original post

Thank you very much, it works !

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Use the below dax it will work

VAR SelectedValue = SELECTEDVALUE(CurrencyAdjustment)

RETURN
SWITCH(
SelectedValue,
"Yes", SUM('Portfolio'[AdjustedCurrencyValue]),
"No", SUM('Portfolio'[NominalValue])
)

Thank you very much, it works !

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.