Forum Discussion
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
| Year | Month | No. of Machine |
| 2021 | January | 20 |
| 2021 | January | 20 |
| 2021 | January | 0 |
| 2021 | February | 20 |
| 2021 | February | 20 |
| 2021 | February | 0 |
| 2021 | March | 20 |
| 2021 | March | 30 |
| 2021 | March | 10 |
| 2021 | April | 20 |
| 2021 | April | 20 |
| 2021 | April | 0 |
| 2022 | January | 10 |
| 2022 | January | 10 |
| 2022 | January | 30 |
| Total | 230 |
Outputs:
| Year | Month | No. of Machine |
| 2021 | January | 40 |
| 2021 | February | 40 |
| 2021 | March | 60 |
| 2021 | April | 40 |
| 2022 | January | 50 |
| Total | 230 |
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
- tackytechtom
Most 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/