Forum Discussion
Anonymous
4 years agoNot applicable
Transform table using DAX
Hello! I am very happy to get ideas on how to transform a table from source to target below using DAX. ------------- EDIT Logic for Sum levels: Number of sum levels are 3 since number of unique ...
MFelix
4 years agoSuper User
Hi Anonymous ,
I'm already abble to calculate the values on the Sum level based on the parent and child relation:
Sum Level =
VAR PathValue =
PATH ( 'Table'[PlanTemplaRowID], 'Table'[PlanTemplateParentRowID] )
VAR Pathlengthvalue =
PATHLENGTH ( PathValue )
RETURN
SWITCH ( Pathlengthvalue, 1, 3, 2, 2, 3, 1 )
Only question that is remaining is the sorting, can it be done based on the seuquence number or not?Is the Sequence Nº is not a part of your original table? Asking this because on the first calculations I have send you refered that they could not be used.
Anonymous
4 years agoNot applicable
Thanks for this answer. It is fine to idé SequenceNo as long as the solution take into consideration that the values may change. I added a support column which I thought could help to understand ☺️