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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Benato
Frequent Visitor

Problem with table totals

Hi there,

 

I am struggling with a problem related to the total and subtotal values in a table visual. Although my total number is correct, the subtotal values in each row are incorrect, and the subtotals of each row do not add up to my total, as can be seen in the figure below.

 

Benato_1-1678115315227.png

 

 

For my measure a use the follow DAX formula: 

TesteKPI_AderenciaPeriodicasAcu_1 =

Var StDate = MIN('Calendar'[Date])
Var EndDate = MAX('Calendar'[Date])+1

Var PrevExec =
calculate(DISTINCTCOUNT(Ordens_SPCM[OS]),Ordens_SPCM[DescSimpOS]="PREVENTIVA",Ordens_SPCM[DataConsi]>=StDate,Ordens_SPCM[DataConsi]<=EndDate,Ordens_SPCM[StatusUser]<>"15NE",Ordens_SPCM[Nivel2StSist]= "ENTE CONF",Ordens_SPCM[dtFimReal]>=StDate,Ordens_SPCM[dtFimReal]<EndDate)

Return
CALCULATE(PrevExec)

-------------------------------------------------------

During my previous analyses, I found that removing the following from the formula: "Ordens_SPCM[dtFimReal]<EndDate" helped the subtotal and total values work correctly. However, when I added it back, my numbers did not add up to the total.

Do you have any tips for how to handle this problem?

2 REPLIES 2
Anonymous
Not applicable

Hi @Benato ,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

In addition, you can also take a look at the following blog about measure calculated with multiple aggregations if helps:

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

Hi,

 

I uploaded the pbix file in the follow link: KPI_Man.pbix

 

Regards,

Benato

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors