DAX Fridays! #91: Sum child values into the parent

DAX Fridays! #91: Sum child values into the parent

Curbal

5 лет назад

10,194 Просмотров

In today's video, I will show you how to sum child values into the parent when you are dealing with hierarchies in Power BI.

This video is based on an example shown in the previous DAX Fridays! video, so I recommend you to watch that first:
https://www.youtube.com/watch?v=e8OWQ7Xl3m0

Happy holidays!
Get Northwind Dataset: https://www.youtube.com/watch?v=k3NMIlLffrU

Link to DAX Fridays survey: http://bit.ly/2MMM4KK



Looking for a download file? Go to our Download Center: https://curbal.com/donwload-center

SUBSCRIBE to learn more about Power and Excel BI!
https://www.youtube.com/channel/UCJ7UhloHSA4wAqPzyi6TOkw?sub_confirmation=1

Our PLAYLISTS:
- Join our DAX Fridays! Series: https://goo.gl/FtUWUX
- Power BI dashboards for beginners: https://goo.gl/9YzyDP
- Power BI Tips & Tricks: https://goo.gl/H6kUbP
- Power Bi and Google Analytics: https://goo.gl/ZNsY8l

ABOUT CURBAL:
Website: http://www.curbal.com
Contact us: http://www.curbal.com/contact

************



************


QUESTIONS? COMMENTS? SUGGESTIONS? You’ll find me here:
► Twitter: @curbalen, @ruthpozuelo
► Google +: https://goo.gl/rvIBDP
► Facebook: https://goo.gl/bME2sB

Тэги:

#DAX_Fridays #DAX_for_beginners #power_pivot_for_beginners #excel_dax #dax_formulas_for_beginners #powerpivot_dax_measures #dax_formulas_for_powerpivot #dax_powerpivot_tutorial #sum_child_to_parent_dax #dax_hierarchies #power_bi_hierarchy #power_bi_hierarchy_example #dax_fridays_#91 #power_bi_parent_child_hierarchy #curbal_sums_parent #parent_and_child_powerpivot_example #parent_child_hierarchy_power_bi #power_bi_parent_child #hierarchies_dax #curbal_power_bi #91
Ссылки и html тэги не поддерживаются


Комментарии:

@andriskriekis6486
@andriskriekis6486 - 14.08.2018 11:19

Hi Ruth,
Think I have the solution just without SUMX ann FILTER (see formula below):

Shipping costs parent =
IF(Orders[Related] = 1;
CALCULATE(
SUM(Orders[Child Shipping costs]);
ALLEXCEPT(Orders;Orders[OrderId])
)
)

Ответить
@vishaljhaveri7565
@vishaljhaveri7565 - 11.01.2023 15:01

Thank You! Nice explanation.

Ответить
@diogobueno176
@diogobueno176 - 07.12.2021 03:10

Hello, I'm struggling with that but in dax, can you help me sying some whats I can do it ? Ou how can I search to understand betternabout the sum of values to parent

Ответить
@myexperiments7298
@myexperiments7298 - 14.06.2021 10:41

Hi, I have two dimension tables (both with parent chil hierarchies with more than 6 levels). And one single fact table with only the child members and their corresponding sales values. I want to display a matrix with the sum of sales when a parent or a child is selected from the dimension tables. I tried using the path function, but this gives correct value only when one dimension is selected. When values are selected from the other dimension slicer, the values are not getting affected by the selection. Please help me with a solution!

Ответить
@MartinMunoa
@MartinMunoa - 21.07.2020 15:28

Hola Ruth! Se te ocurre qué se puede hacer cuando hay mas de un nivel de jerarquías? En mi caso hay unos 4 niveles, y necesito que primero se calcule el subtotal del último nivel antes de calcular el siguiente porque sino no hay de donde obtener el valor del costo del nivel anterior.. (En este caso del video funciona porque todos los elementos del nivel anterior - los "child" - tienen un valor ya definido por dato).
Gracias!

Ответить
@lukaszrutkowski
@lukaszrutkowski - 04.07.2020 13:03

Hi Ruth, I have a larger structure than child to one parent. The parent can have parent and so on. Let's say there are 5 levels. For each level I would like to have the sum for all the children below going to the leaf of the tree. So the most top parent would have the sum of everything. What solution would you recommend?
PS. Option2: the number of levels is unlimited.

Ответить
@NaraMeerammaTrust
@NaraMeerammaTrust - 13.10.2019 21:22

I see. That's OK Ruth. I will manage it. Thanks for your time

Ответить
@NaraMeerammaTrust
@NaraMeerammaTrust - 13.10.2019 20:37

Ruth, I don't find this video on download center now. Can you please upload it if possible. I have similar situation on my current project. I wanted to see and practice before come up with appropriate solution. Please upload it at our earliest possible convenience. Thank you

Ответить
@eladiobardelli3001
@eladiobardelli3001 - 20.08.2018 15:14

Lo que explicaste se puede usar para hacer informes de balances , asumiendo el id como las agrupación de las cuentas activo,pasivo,perdidas y ganancias y obtener un balance automático cierto Ruth , puede ser una buen uso de esa manera , gracias saludos desde Chile.

Ответить
@aks541
@aks541 - 13.08.2018 15:12

One query- this if(Order[related] = 2,... part of the formula is required to display the calculated filed "Shipping Cost Parent" is nice fashion otherwise it will look clumsy. Am I correct?

Ответить
@jerrykappa6899
@jerrykappa6899 - 11.08.2018 01:27

Great... I am using this approach quite often.. nevertheless we could use as well a calculatetable with a summarize function. If the data set is huge, it is faster than related. I tend to work with big data set ie between 60 and 100 millions rows therefore calculatetable with summarize is more efficient for me... when possible. In your example you used sumx. I do calculate function with sum and filter as presented and it works the same way avoiding the sumx which is more resource hungry... good job on the videos... waiting for the next ones...

Ответить
@victorarayal
@victorarayal - 10.08.2018 22:55

Hola Ruth! Buen video, gracias!
Consulta. Que herramientas usas para escribir y destacar sobre la pantalla?

Ответить
@prateekraina2781
@prateekraina2781 - 10.08.2018 21:03

Nice video. In my experience EARLIER function should be avoided incase the dataset is huge. It performs very slow. What’s your take on that?

Ответить
@mehdihammadi6145
@mehdihammadi6145 - 10.08.2018 20:18

Thank you for sharing

Ответить
@rrrprogram8667
@rrrprogram8667 - 10.08.2018 18:57

Nice video ruth

Ответить
@frankgovers8420
@frankgovers8420 - 10.08.2018 18:37

👍👍

Ответить
@rassten
@rassten - 10.08.2018 16:31

it can not be right, it seems too easy :-)

Ответить
@tanababa
@tanababa - 10.08.2018 16:13

Thank you Ruth. Great video, Tamir

Ответить