'what kind of measure or column will use here

[Please refer to the below image. I want to create a stacked column chart but I don't have a column that includes 0-30, 30-60, 60-90, etc. How did I put this range on X-axis? And I didn't understand what kind of measure is used for "LAST 3 MONTH average" & "LAST 12 MONTH average ". Can you please assist me with the same? ]

https://i.stack.imgur.com/AEnoa.png



Solution 1:[1]

Here is Microsoft documentation on using grouping and binning features in Power BI: https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning

You can create a measure for last 3 month average like this:

3 Month Average = CALCULATE(
                      AVERAGE(Table[value]),
                      FILTER(Table,
                          Table[date] >= DATE(YEAR(TODAY()),MONTH(TODAY()-3),DAY(TODAY()))
                      )
                  )

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1