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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

restar valores por fecha y luego sumar el total en un general

Actualmente estoy trabajando en una tabla la cual me indica los litros excedidos por fechas, para un determinado equipo, la formula que he empleado para los litros excedidos si bien funciona cuando mantengo este formato de tabla, no me sirve cuando quiera escalar a un resumen por equipo. El total de los litros excedidos corresponde a los litros totales - limite superior que se definio resultando en 876,52, cuando en realidad deberia ser 59.32.

BenjaVilla_1-1620064177316.png

Dejo una copia de la formula que se empleo.

BenjaVilla_2-1620064323173.png

 

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description and sample picture, it seems that you have faced the problem that the total row of the measure displays the wrong value, right? To deal with this kind of problem, we often create a new measure to replace the original measure in the table chart, you can create a new measure like this:

Litros Excedidos_new =

var _new=SUMMARIZE('Table','Table'[Fecha],"_value",[Litros Excedidos])

return IF(HASONEVALUE('Table'[Fecha]),[Litros Excedidos],SUMX(_new,[_value]))

Then you can go to the table chart and replace the original measure with it in the table chart.

And you can get what you want.

 

Some links that talk about this solution:

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

https://community.powerbi.com/t5/Desktop/How-to-show-total-row-as-sum-of-distinct-count/td-p/1416468

 

If you still have a problem, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

View solution in original post

1 REPLY 1
v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description and sample picture, it seems that you have faced the problem that the total row of the measure displays the wrong value, right? To deal with this kind of problem, we often create a new measure to replace the original measure in the table chart, you can create a new measure like this:

Litros Excedidos_new =

var _new=SUMMARIZE('Table','Table'[Fecha],"_value",[Litros Excedidos])

return IF(HASONEVALUE('Table'[Fecha]),[Litros Excedidos],SUMX(_new,[_value]))

Then you can go to the table chart and replace the original measure with it in the table chart.

And you can get what you want.

 

Some links that talk about this solution:

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

https://community.powerbi.com/t5/Desktop/How-to-show-total-row-as-sum-of-distinct-count/td-p/1416468

 

If you still have a problem, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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