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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Incorrect row total

Nice day
Someone can advise me, I have problems calculating the total number of rows, at other times use measures such as
Hasonevalue, isinscope, filter, among others for the column total, however
how can I correct the total, but in columns?

since when applying a measure it is calculated row by row applying the given filters and in the total, instead of adding the result of each column subtotal, it performs the same operation of the measure with these same filters obtaining an incorrect column total. Thank you!

I share my example:

I have the following:

Falls=
Var soff = SELECTEDVALUE(WeeksOneContact[WEEK OC])
Var Hvta =
CALCULATE(
DISTINCTCOUNT('Hijos Venta'[id_empleado_hijo]),
'Hijos Venta'[Hijos Vta] = "Vendio",,
FILTER( ALL(WeeksOneContact[WEEK OC]),
WeeksOneContact[WEEK OC] = soff))

Var hard = SELECTEDVALUE(WeeksOneContact[Week OC])-1
Var HNovta =
CALCULATE(
DISTINCTCOUNT('Hijos Venta'[id_empleado_hijo]),
'Hijos Venta'[Hijos Vta] = "Vendio",,
FILTER( ALL(WeeksOneContact[WEEK OC]),
WeeksOneContact[Week OC] = hard))

Var Caen =
IF
(HNovta=0,Hvta,0)

Return
sumX(ALLSELECTED('Children Sale'[id_empleado_hijo]),[Caen])






1 ACCEPTED SOLUTION

Hi, @Syndicate_Admin 

Please add a new measure to replace 'falls':

New falls =
IF (
    ISINSCOPE ( 'WeeksOneContact'[Week OC] ),
    [Falls],
    SUMX ( ALLSELECTED ( 'WeeksOneContact'[Week OC] ), [Falls] )
)

Best Regards,
Community Support Team _ Eason

 

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

FrancoQuiroga_0-1661999128517.png

I share an example image, as can be seen after comparing a week vs the previous one, a result of 6 and 7 is obtained so the sum is expected with a total of 13, however when evaluating at the row level, the measure returns 0 in the total of the column

Hi, @Syndicate_Admin 

Please add a new measure to replace 'falls':

New falls =
IF (
    ISINSCOPE ( 'WeeksOneContact'[Week OC] ),
    [Falls],
    SUMX ( ALLSELECTED ( 'WeeksOneContact'[Week OC] ), [Falls] )
)

Best Regards,
Community Support Team _ Eason

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.