Forum Discussion
Sravan_cheni
4 years agoNew Member
Urgent!!!! I need quick help
As seen in the above image rows indicates Type and column indicates work station and the values are the total units processed in a workstation based on the uph type (shown in %). No...
- 4 years ago
Hi Sravan_cheni
For the table you need to select the required columns from the original one and then add the measures as columns.Table2 = VAR SelectedTable = SELECTCOLUMNS ( Table, "UPH_TYPE", Table[UPH_TYPE], "WORKSTATION (TIER 2)", Table[WORKSTATION (TIER 2)] ) RETURN ADDCOLUMNS ( SelectedTable, "Units_S", [Units_S], "% units", [% units] )Then add a new calculated column
New Column = VAR WSTable = CALCULATETABLE ( Table2, ALLEXCEPT ( Table2, Table2[WORKSTATION (TIER 2)] ) ) VAR MaxUnits = MAXX ( WSTable, Table2[Units_S] ) RETURN MAXX ( FILTER ( WSTable, Table2[Units_S] = MaxUnits ), Table2[UPH_TYPE] )
tamerj1
Community Champion
4 years agoHi Sravan_cheni
For the table you need to select the required columns from the original one and then add the measures as columns.
Table2 =
VAR SelectedTable =
SELECTCOLUMNS (
Table,
"UPH_TYPE", Table[UPH_TYPE],
"WORKSTATION (TIER 2)", Table[WORKSTATION (TIER 2)]
)
RETURN
ADDCOLUMNS ( SelectedTable, "Units_S", [Units_S], "% units", [% units] )
Then add a new calculated column
New Column =
VAR WSTable =
CALCULATETABLE ( Table2, ALLEXCEPT ( Table2, Table2[WORKSTATION (TIER 2)] ) )
VAR MaxUnits =
MAXX ( WSTable, Table2[Units_S] )
RETURN
MAXX ( FILTER ( WSTable, Table2[Units_S] = MaxUnits ), Table2[UPH_TYPE] )
Sravan_cheni
4 years agoNew Member
Thank you tamerj1 Thanks a Lot