Forum Discussion

Varshi288's avatar
Varshi288
Icon for Resolver II rankResolver II
6 years ago
Solved

Cumulative total sorted by category

Hi  

 

I have table with Orders, SalesPrice and Item and running total measure which is good when I filter  with  Item Running totals are worng. any suggestion 

 

Regards 

Varshi

 

  • Hi Varshi288 ,

     

    You matrix visual looks strange. Would you please try to use the following measure:

     

    Running totals = CALCULATE(SUM(Sales[SP]),FILTER(ALLSELECTED(Sales),Sales[Order no] <= MAX(Sales[Order no])))

     

    If this doesn't work, Would you please share your pbIx file by onedrive for business if possible? Then we will help you more correctly.

     

    Please do mask sensitive data before uploading.

     

    Thanks for your understanding and support.

     

    Best Regards,

    Dedmon Dai

     

  •  

     Thanks Ryan,

     

      After using Sales[SP]  instead of Oreder no. this worked .

     

    Measure = CALCULATE(SUM(Sales[SP]),FILTER(ALLSELECTED(Sales),Sales[SP] <= MAX(Sales[SP])))
     
    Br
    Varshi.

5 Replies

  • Varshi288 

    I am wondering why you use orderno <= max(order no). I think now matter what item you select, the orderno in the table must less than or equal to the max orderno.

    please try sum(sales[sp])

     

    • Varshi288's avatar
      Varshi288
      Icon for Resolver II rankResolver II

       

       Thanks Ryan,

       

        After using Sales[SP]  instead of Oreder no. this worked .

       

      Measure = CALCULATE(SUM(Sales[SP]),FILTER(ALLSELECTED(Sales),Sales[SP] <= MAX(Sales[SP])))
       
      Br
      Varshi.
      • v-deddai1-msft's avatar
        v-deddai1-msft
        Icon for Community Support rankCommunity Support

        Hi Varshi288 ,

         

        I'm glad that you have solved it by yourself. Would you please consider Accept it as the solution to help the other members find it more quickly.

         

        Best Regards,

        Dedmon Dai

  • Varshi288 , Not sure I got it. But your order number is test field that is why you getting sorting like that. If you change that whole no, it will work in numeric sequence

  • v-deddai1-msft's avatar
    v-deddai1-msft
    Icon for Community Support rankCommunity Support

    Hi Varshi288 ,

     

    You matrix visual looks strange. Would you please try to use the following measure:

     

    Running totals = CALCULATE(SUM(Sales[SP]),FILTER(ALLSELECTED(Sales),Sales[Order no] <= MAX(Sales[Order no])))

     

    If this doesn't work, Would you please share your pbIx file by onedrive for business if possible? Then we will help you more correctly.

     

    Please do mask sensitive data before uploading.

     

    Thanks for your understanding and support.

     

    Best Regards,

    Dedmon Dai