Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

conceptual question

Hello Community!   So one of our VP's has a request to do something in a report, and not sure how to go about it.     Here is a small section of her Excel report.    The "Risk #"  indicates, esse...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

    Could you please check if the below screen shot is what you want? 

    If yes, you can get it by the below 2 methods:

    1. Create a calculated column or measure directly with SWITCH function

    COriginal value = DIVIDE('Table'[Sales],SWITCH('Table'[Risk #],1,0.9,2,0.75)) //Calculated column
    MOriginal value = SUMX(VALUES('Table'[Risk #]), DIVIDE(MAX('Table'[Sales]),SWITCH(MAX('Table'[Risk #]),1,0.9,2,0.75))) //Measure

    2. Create a risk table and a measure to get it just like below screen shot

    Original value = DIVIDE(MAX('Table'[Sales]),CALCULATE(MAX('Risk'[Rate]),FILTER(ALL('Risk'[Risk #]),'Risk'[Risk #]=MAX('Table'[Risk #]))))

    I created a sample pbix file with the above methods, you can download it from this link.

    Best Regards

    Rena