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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
amartinezTower
Frequent Visitor

Sum of data with accumulated

Good community,

I have the sum of some data displayed monthly.

Total Data - SUM(TH_SegProduccion_Golpes[TotalDest])
I have another measure to see the same data accumulated in 6 months.
Total Data Acum6m
VAR AcumuladoDatos=
CALCULATE([Total Datos],DATESINPERIOD(TD_Calendario[Fecha],MAX(TD_Calendario[Fecha]),-6,MONTH))
RETURN
IF ([Total Datos]<>BLANK(),AcumuladoDatos)
When I show the data in the table it shows me the cumulative total since the last date
Captura de pantalla 2020-12-01 123436.png
But I want you to sum up the total of the detours:
Total= 1.352.904 + 1.305.285 + 1.232.726 + 920.541 + 824.461 + 811.195 + 852.989 + 878.178
Can someone help me? Thank you in advance
1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @amartinezTower 

Try  this new measure based on the one you already have:

Total Data Acum6m TOT =
SUMX ( DISTINCT ( TD_Calendario[Year-Month] ), [Total Data Acum6m] )

where  TD_Calendario[Year-Month]  is the field in the columns of your matrix visual. If you also have fields on the rows, you'll have to use SUMMARIZE( ) instead of distinct to include them  

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

View solution in original post

1 REPLY 1
AlB
Super User
Super User

Hi @amartinezTower 

Try  this new measure based on the one you already have:

Total Data Acum6m TOT =
SUMX ( DISTINCT ( TD_Calendario[Year-Month] ), [Total Data Acum6m] )

where  TD_Calendario[Year-Month]  is the field in the columns of your matrix visual. If you also have fields on the rows, you'll have to use SUMMARIZE( ) instead of distinct to include them  

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.