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
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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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