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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Syndicate_Admin
Administrator
Administrator

Incorrect table sum

Good.

I have a table in which I calculate a cost, this comes from the measurement

Cost = (TOTAL/TOTAL_MES) * TOTAL_UNIDAD

Total month and unit are from the same table, the total is not.

In the following image I want to calculate the sum of the green, since the total shows me some values that lead me to error, the table is applied the date and unit filter that makes total unit vary.

Aguirre_0-1718618397580.png

I really work with 6 units but I have put that the ones with total unity to zero do not appear, it would really be like this:

Aguirre_1-1718618714466.png

Any ideas to show on a card only the sum of the values in the cost column.

Thanks a lot

2 REPLIES 2
Anonymous
Not applicable

Hi @Syndicate_Admin ,

You can modify your meaure like below:

 

Result = 
CALCULATE(
    SUMX(
        'Table' ,
        ( 'Table'[TOTAL] / 'Table'[TOTAL_MES]) * 'Table'[TOTAL_UNIDAD]
    ),
    ALLSELECTED('Table'[Date]),
    ALLSELECTED('Table'[Unit])
)

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

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

Good.

I have tried the measurement and it does not work correctly for me as you can see in the picture:

Aguirre_0-1718693245069.png

I detail in the image the adapted measure and the other disaggregated measures, I am going to try to set up an example in .pbix,

COSTE_FORO =
CALCULATE(
SUMX(
'F_BI_REPARTO' ,
( [TOTAL] / [TOTAL_MES]) * F_BI_REPARTO[TOTAL_UNIDAD]
),
ALLSELECTED(Calendar[Date]),
ALLSELECTED(F_BI_FARMACIA_REPARTO_HOSP[UNIT])
)
TOTAL_MES=
CALCULATE(
SUM( F_BI_REPARTO[TOTAL_UNIDAD]),
REMOVEFILTERS(F_BI_REPARTO[UNIT])
)
TOTAL = SUMX(
F_BI_GESTION,
F_BI_GESTION[Cantidad_Signo]*F_BI_GESTION[PRECIO_MEDIO]
)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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