Forum Discussion

CarlosV's avatar
CarlosV
Regular Visitor
6 years ago
Solved

How can I compare values from 2 different sheets in Power BI?

Hello everyone   I have 2 table sheets in which they share common data and I would like to compare the difference between them to calculate the delta or differences with a filter condition.    An...
  • mahoneypat's avatar
    6 years ago

    Try this approach.  Make a table visual with the Part Number from Table1 and add this measure

     

    Delta =

    var currentpart = selectedvalue(Table1[PartNumber])

    var table1open = calculate(Sum(Table1[Qty]), Table1[Status]="Open")

    var table2open = calculate(sum(Table2[Qty]), Table2[Status]="Open", Table2[PartNum]=currentpart)

    return table1open-table2open

     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat