Forum Discussion

Tevon713's avatar
Tevon713
Icon for Helper V rankHelper V
4 years ago
Solved

Sum per month per value

Hi all,

 

This subject may be solve somewhere. I can't seem to get my head around to it. Create measure to sum per month/year of the value. Also there will be a date filter slicer for user selection. See below. Thank you for your help.

 

Data Table

YearMonthNo. of  Machine
2021January20
2021January20
2021January0
2021February20
2021February20
2021February0
2021March20
2021March30
2021March10
2021April20
2021April20
2021April0
2022January10
2022January10
2022January30
 Total230

 

Outputs:

YearMonthNo. of Machine
2021January40
2021February40
2021March60
2021April40
2022January50
 Total230
  • Hi Tevon713 l

     

    I pasted your data into a table in PBI:

     

     

    Then, I created a simple measure:

    SumMachineMeasure =  SUM ( Table[No. of  Machine] )

     

    Lastly, I dragged the measure into a table visual with the Year and Month. Note, the year column might have an implicite sum. Choose "don't summarize" instead:

     

     

    Power BI does the grouping for you by applying filters in the visual.

     

    Let me know if this helps or if you have any questions!

     

    /Tom
    https://www.tackytech.blog/
    https://www.instagram.com/tackytechtom/

2 Replies

  • tamerj1's avatar
    tamerj1
    Icon for Community Champion rankCommunity Champion

    Hi Tevon713 

    create a table visual. Inset the year and the month columns. Make sure to select "don't summarize". 
    create a measue

    SUM ( TableName[No. of Machine] )

    inset the measure into the table. 

  • tackytechtom's avatar
    tackytechtom
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hi Tevon713 l

     

    I pasted your data into a table in PBI:

     

     

    Then, I created a simple measure:

    SumMachineMeasure =  SUM ( Table[No. of  Machine] )

     

    Lastly, I dragged the measure into a table visual with the Year and Month. Note, the year column might have an implicite sum. Choose "don't summarize" instead:

     

     

    Power BI does the grouping for you by applying filters in the visual.

     

    Let me know if this helps or if you have any questions!

     

    /Tom
    https://www.tackytech.blog/
    https://www.instagram.com/tackytechtom/