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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Sum of values based on distinct values in other column

Hello Everyone,

My name is Leonardo and I have this table :

 

[IMG]http://i66.tinypic.com/29qfl88.png[/IMG]

 

 

The table shows the volume in "M3" for each SKU produced, as well as the Volume of "Lubricacion Consumo (M3)" and "Consumo Lavadora (M3)", which are the same for each "LINEA". The general consumption of water on the "Consumo M3" day is also shown. What I want to calculate: "Otros consumos (m3)" = "Consumo M3" - "Consumo Lubricacion (m3)" - "Consumo Lavadora (m3)"; for each day. for example: For 03/01/2018 would have Other consumptions (m3) = 686 - (41 + 21 + 40 + 0) - (135 + 100 + 0 + 154).

 

Likewise I want to calculate the WUR (Water Usage Ratio) = ((Sum of "M3") + (Sum "Consumo M3")) / (Sum of "M3"), for each day. For example: For 03/01/2018 I would have WUR= ((28 + 107 + 68 + ....) + 686) / (28 + 107 + 68 + ..) Please help me, I've broken my head trying to calculate it with distinct but it still does not work out.

 

 

 

My entire thanks. Leonardo LIMA PERU

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 REPLIES 0

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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