Forum Discussion

jafdias's avatar
jafdias
Frequent Visitor
8 years ago
Solved

DAX With Percentage Total accumulated

Hello Guys, 

I'd Like to know if can i do a DAX calculation with a percentage accumulated like picture above in "Shipment" Column.

 

The First Line (CETUS) represents 33% of Total Sum of Volume.

The Second Line represents 23% (Apus) + 33% (Cetus) and the same function for other lines.

 

 

I Really apreciate if someone could help me with this case.

Thanks.

JDias

  • Hi jafdias

     

    You could try something along the lines of this calculated column.  I have attached a PBIX file to this message with a working example.

     

    Column = 
    VAR Total = SUM('Table1'[Volume])
    VAR RunningTotal = SUMX(FILTER('Table1','Table1'[Volume] >= EARLIER('Table1'[Volume])),'Table1'[Volume])
    RETURN  RunningTotal / Total

4 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    Hi jafdias

     

    You could try something along the lines of this calculated column.  I have attached a PBIX file to this message with a working example.

     

    Column = 
    VAR Total = SUM('Table1'[Volume])
    VAR RunningTotal = SUMX(FILTER('Table1','Table1'[Volume] >= EARLIER('Table1'[Volume])),'Table1'[Volume])
    RETURN  RunningTotal / Total
    • jafdias's avatar
      jafdias
      Frequent Visitor

      Hello Phill, thank you for your answer.

       

      Your solution workly perfectly in my case.

       

      Thank you so much for your help.

       

  • Hi,

     

    Share the link from where i can download your PBI file.  Ensure that you have the volume measure in your visual.

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Hi jafdias,

     

    Could you please share some dummy data for further analysis?

     

    Regards,

    Jimmy Tao