Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vflorente
New Member

Total of a 3 Month Rolling Total Measure

Hi,

I have a measure that calculates a 3 month rolling total (Annualized Activity Count).

 
Annualize Activity Count = CALCULATE(Sum(SVRIVR4[Annualize Rate]), DATESINPERIOD('Calendar'[Date], LASTDATE('Calendar'[Date]), -3, MONTH))

 

On a table the data reflects by the month

Table.jpg

Is there a way to have the Grand Total show a total of 584?

or at least when the measure is put on a card it will display the total of 584?

 

Thanks!

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @vflorente ,

You can use the HASONEVALUE() function to fix the Total incorrect.

Here are the steps you can follow:

1. Create measure.

Total_Annualize Activity Count =
var _table=SUMMARIZE('Calendar','Calendar'[Date],"_value",[Annualize Activity Count])
return
IF(HASONEVALUE('Calendar'[Date]),[Annualize Activity Count],SUMX(_table,[_value]))

2. Result:

vyangliumsft_0-1647249860397.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @vflorente ,

You can use the HASONEVALUE() function to fix the Total incorrect.

Here are the steps you can follow:

1. Create measure.

Total_Annualize Activity Count =
var _table=SUMMARIZE('Calendar','Calendar'[Date],"_value",[Annualize Activity Count])
return
IF(HASONEVALUE('Calendar'[Date]),[Annualize Activity Count],SUMX(_table,[_value]))

2. Result:

vyangliumsft_0-1647249860397.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Ashish_Mathur
Super User
Super User

Hi,

Assuming the Year and Month name fields have been dragged from the Calendar Table, write this measure:

AAC final =SUMX(VALUES('Calendar'[Month name]),[Annualised Activity Count])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.