Forum Discussion

suma2413's avatar
suma2413
Frequent Visitor
2 years ago
Solved

Display Measures with Custom Hierarchy

Hello, I am working on converting an Excel report to a powerBI report.  We have calculated multiple measures separately calculated for each row displayed below, but we now have to display it in a H...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  suma2413 ,

    I created some data:

    Are you referring to custom rules in each hierarchy? You can use the IF() + Isinscope() functions to determine each hierarchy.

     

    Here are the steps you can follow:

    1. Create measure.

    Measure =
    IF(
        ISINSCOPE('Table'[Group2]),1,
        IF(
             ISINSCOPE('Table'[Group1]),2,
            IF(
               ISINSCOPE('Table'[ALL Sales]),3,0)))

    2. Result:

     

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly