Forum Discussion

Rahul_001's avatar
Rahul_001
Regular Visitor
1 year ago
Solved

Showing specific columns respective to Rule_ID(Dynamic change in table visualization)

Sample Source Data ::   Excp_Col_Metadata ID Rule_ID Version Exception_Column_Name Excp_col_index Is_Active Updated_Timestamp Updated_by 1 1001 1 Customer_...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Rahul_001 ,

     

     As DataNinja777 mentioned before, Field parameter is a good way. However it needs us to choose the column name manually after we filter Rule ID.

    As far as I know, I suggest you to use matrix, because it is the best way to hide and show columns dynamiclly.

    If you still need to create table visuals, you can try this way.

    Add an Index column in 'Exception Data' table. Then create five measures for these columns.

    Customer_ID = 
    VAR _Indexlist = VALUES(Excp_Col_Metadata[Excp_col_index])
    RETURN
    IF(1 IN _Indexlist,CALCULATE(SUM('Exception Data'[Excp_Col_Value_1])))
    Name = 
    VAR _Indexlist = VALUES(Excp_Col_Metadata[Excp_col_index])
    RETURN
    IF(2 IN _Indexlist,CALCULATE(MAX('Exception Data'[Excp_Col_Value_2])))

    ...

    Result is as below.

    We can find that it couldn't hide the column header for the empty column.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.