Forum Discussion
Table Calculations
- Anonymous3 years ago
Hi RAHULBANDI ,
Please try below steps:
1. add a index column with power query pane, because
2. add measure with below dax formula
Name1 = VAR cur_id = SELECTEDVALUE ( 'Table'[Index] ) VAR cur_name = SELECTEDVALUE ( 'Table'[Name] ) VAR cur_at = CALCULATE ( MAX ( 'Table'[Amount] ), 'Table'[Index] = cur_id ) RETURN SWITCH ( TRUE (), cur_id = 1, cur_name, cur_id = 2, cur_name, "Blank" )Amount1 = VAR cur_id = SELECTEDVALUE ( 'Table'[Index] ) VAR cur_name = SELECTEDVALUE ( 'Table'[Name] ) VAR cur_at = CALCULATE ( MAX ( 'Table'[Amount] ), 'Table'[Index] = cur_id ) RETURN SWITCH ( TRUE (), cur_id = 1, cur_at, cur_id = 2, cur_at, "Blank" )Name2 = VAR cur_id = SELECTEDVALUE ( 'Table'[Index] ) VAR cur_name = SELECTEDVALUE ( 'Table'[Name] ) VAR cur_at = CALCULATE ( MAX ( 'Table'[Amount] ), 'Table'[Index] = cur_id ) RETURN SWITCH ( TRUE (), cur_id = 3, cur_name, cur_id = 4, cur_name, "Blank" )Amount2 = VAR cur_id = SELECTEDVALUE ( 'Table'[Index] ) VAR cur_name = SELECTEDVALUE ( 'Table'[Name] ) VAR cur_at = CALCULATE ( MAX ( 'Table'[Amount] ), 'Table'[Index] = cur_id ) RETURN SWITCH ( TRUE (), cur_id = 3, cur_at, cur_id = 4, cur_at, "Blank" )3. add a table visual with table fields and measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi RAHULBANDI ,
Please try below steps:
1. add a index column with power query pane, because
2. add measure with below dax formula
Name1 =
VAR cur_id =
SELECTEDVALUE ( 'Table'[Index] )
VAR cur_name =
SELECTEDVALUE ( 'Table'[Name] )
VAR cur_at =
CALCULATE ( MAX ( 'Table'[Amount] ), 'Table'[Index] = cur_id )
RETURN
SWITCH ( TRUE (), cur_id = 1, cur_name, cur_id = 2, cur_name, "Blank" )
Amount1 =
VAR cur_id =
SELECTEDVALUE ( 'Table'[Index] )
VAR cur_name =
SELECTEDVALUE ( 'Table'[Name] )
VAR cur_at =
CALCULATE ( MAX ( 'Table'[Amount] ), 'Table'[Index] = cur_id )
RETURN
SWITCH ( TRUE (), cur_id = 1, cur_at, cur_id = 2, cur_at, "Blank" )
Name2 =
VAR cur_id =
SELECTEDVALUE ( 'Table'[Index] )
VAR cur_name =
SELECTEDVALUE ( 'Table'[Name] )
VAR cur_at =
CALCULATE ( MAX ( 'Table'[Amount] ), 'Table'[Index] = cur_id )
RETURN
SWITCH ( TRUE (), cur_id = 3, cur_name, cur_id = 4, cur_name, "Blank" )
Amount2 =
VAR cur_id =
SELECTEDVALUE ( 'Table'[Index] )
VAR cur_name =
SELECTEDVALUE ( 'Table'[Name] )
VAR cur_at =
CALCULATE ( MAX ( 'Table'[Amount] ), 'Table'[Index] = cur_id )
RETURN
SWITCH ( TRUE (), cur_id = 3, cur_at, cur_id = 4, cur_at, "Blank" )
3. add a table visual with table fields and measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.