Forum Discussion

Nino1's avatar
Nino1
Frequent Visitor
3 years ago
Solved

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...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Use the below dax it will work

    VAR SelectedValue = SELECTEDVALUE(CurrencyAdjustment)

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

  • Nino1's avatar
    Nino1
    3 years ago

    Thank you very much, it works !