Forum Discussion

pdory's avatar
pdory
Frequent Visitor
2 years ago
Solved

Need help with cumulative total without date

Hi everyone,   I'm looking for some help to create a DAX measure that will show the cumulative total of the Supplier Spend starting from the highest value.  Here is a link to the pbix: Link to s...
  • Daniel29195's avatar
    2 years ago

    pdory 

     

    output : 

     

     

    measure : 

    Measure = 
    CALCULATE(
        [spend],
        WINDOW(
            0,ABS,
            0,REL,
            ALLSELECTED(Spend[Supplier Name]),
            ORDERBY([spend] ,DESC)
        )
    )

     

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

     

  • Daniel29195's avatar
    Daniel29195
    2 years ago

    pdory 

    forgot to mention : 

    create a measure 

    spend = sum(table_name[spend]) 

     

    If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

  • Daniel29195's avatar
    Daniel29195
    2 years ago

    pdory 

    try this one : 

    spend = SUM(Spend[Supplier Spend])

     
    rnk =
     RANKX(ALLSELECTED('Spend'[Supplier Name]), [Spend], , DESC, Dense)
     
     
    Running Total =
    VAR CurrentRank = [rnk]
    RETURN
    CALCULATE(
        [spend],
        FILTER(
            ALLSELECTED(Spend[Supplier Name]),
            [rnk] <= CurrentRank
        )
    )
     
     
     
    let me know if this works for you .