cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
l6903b5
Frequent Visitor

Rolling values per category

I need help with DAX. 

 

I have this table:

business unityear_monthcategoryamountamount all categories12 month rolling sum 

12 month rolling sum 

all categories

12 month mov avg %
PS202206A41041040%
PS202207A69101953%
PS202208A610162955%
PS202209A34193358%
PS202210A918285155%
PS202211A37315853%
PS202212A00315853%
PS202301A512367051%
PS202302A1121479152%
I have filtered Year-month >= 202206 because column category is blank before this date. I have filtered on 1 business unit and 1 category, but there are more in de dataset. Amount all category = amount of all categories in business / year-month.
 

I have a date table. I need the Dax formula for the 12 month rolling sum. This is wat I have thus far:

12 month rolling sum =
var amount = COUNT('Table'[category])
Return  CALCULATE (amount, DATESINPERIOD (Calendar[DATE],LASTDATE ( Calendar[DATE] ),-365,DAY))
 
But it gives my the same as column amount. 
 
0 REPLIES 0

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors
Top Kudoed Authors