Forum Discussion

maricci's avatar
maricci
Regular Visitor
2 years ago
Solved

Subtracting values, threading through several tables

Good day everyone, I am attaching the PowerBi file.https://drive.google.com/file/d/1HWX0sZt1FZ_JnZCnSu9OTAwhhhum8azq/view?usp=sharing  I don't know how to subtract the values, which in some cases a...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi maricci 

    Based on your description, I create the following measure.

    Measure = sumx(VALUES('met'[line]),SUM('fact'[amount]))
    Measure 2 = IF(ISINSCOPE(met[ran]),[Measure],IF(ISINSCOPE(lib[line]),MAX(lib[sign])*[Measure]))
    Measure 3 = SUMX(VALUES(lib[line]),[Measure 2])
    Measure 4 = SUMX(VALUES(lib[column]),[Measure 3])
    Measure 5 = SUMX(VALUES(lib[table]),[Measure 4])

    Then put the meaure 5 to the value.

    Output

     

    Best Regards!

    Yolo Zhu

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