Forum Discussion

Zeesh1979's avatar
Zeesh1979
Regular Visitor
3 years ago
Solved

Counting rows

I have table that contains List of items and their sales count on date basis. i created a new column that contains month. now i want to have commulative sum of sales for each month. e.g. if in filter i select March, then it should give me sum of all sales till march (march excluding march) and when i select April then sum of all sales till april (excluding april)

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Zeesh1979 ,

    I made a simple file, please check the model:

     

    Total Sales = 
    VAR _month = SELECTEDVALUE('Calendar'[Month])
    VAR _total = CALCULATE(SUM('SalesTable'[Sales]),FILTER('SalesTable',_month>MONTH('SalesTable'[Date]))) + 0
    RETURN
    _total

     

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data

7 Replies