Forum Discussion

Wicak's avatar
Wicak
Helper I
3 years ago
Solved

Data Difference based on different column

 

i connected the three tables using the material table. I want to get the result of the difference value of the three tables. any suggestions so that the DAX doesn't just use this method? Example Dax, sum ( Material A ) - sum ( Material B ). but, in this way only compare 2 tables

 

Thanks

3 Replies

  • daXtreme's avatar
    daXtreme
    Solution Sage

    Why 3 tables when 1 is enough? Just create this table instead (it's called melting or unpivoting):

     

    Material | SystemNo   | Value

    A            | System1     | val1

    B            | System2     | val2

    ...

     

    I hope you get the gist. Power BI does not like to work with the tables you've got. It likes the table I showed you. Once you've got such a table, it'll be easy to do anything...

     

    Having such a table you create a measure: [Total] = SUM( T[Value] ) and by slicing the table by Metarial/SystemNo, you can build from this base measure any measure you need.