Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

DAX Group by Calculation

Hello,   Please can someone help me with my calculation.   I have a dataset which looks like the below, I cannot change the structure of the data. I need to create a calculation which will multip...
  • Ritaf1983's avatar
    2 years ago

    Hi Anonymous 
    Try this 2 formulas:

    1.

    recycled =
    sumx(
        SUMMARIZE('Table','Table'[AssetType],"total rec",CALCULATE(sum('Table'[volume]),'Table'[UnitOfMeasure]="Recycled")*CALCULATE(sum('Table'[volume]),'Table'[UnitOfMeasure]="Unit Weight")),[total rec])
    2.
    reused =
    sumx(
        SUMMARIZE('Table','Table'[AssetType],"total reu",CALCULATE(sum('Table'[volume]),'Table'[UnitOfMeasure]="Reused")*CALCULATE(sum('Table'[volume]),'Table'[UnitOfMeasure]="Unit Weight")),[total reu])

    the pbix is attached
    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly