Forum Discussion

Tarunika's avatar
Tarunika
Helper II
3 years ago
Solved

Displaying a Column As dropdown depending upon selecting a value from a table

Hi all,

I have a table visual  consisting of Meters_ID column when i select a particular value from the table visuals i want to display the Events as a dropdown depending upon the selection this should happen dynamically.

 

Please refer the below image i want the last 5 Events dropdown .Can someone help me in achieving this

 

 

Meter_IDMeter AgeDev codeEvent1Event2Event3Event4Event5
11868045173SAABCDE
12013335174SAEDCBA
12078375096SAABCDE
12166605182SAABCDE
12117525166 ABCDE
12066104875PRABCDE
12255774901SAABCDE
12125885074PRABCDE
12214444510PRABCDE
12358945434 EDCBA
12354195061PREDCBA
12582144896SAEDCBA
12344944922SAEDCBA
12593935349AVEDCBA

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Tarunika ,

    For display a column as dropdown, you need develop a custom visual to render. Below i provide a sample that use tooltip to achieve your needd without dropdown button.

    Please try below steps:

    1. create meaure with below dax formula

    DC =
    VAR cur_id =
        SELECTEDVALUE ( 'Table'[Meter_ID] )
    VAR cur_code =
        CALCULATE (
            MAX ( 'Table'[Dev code] ),
            FILTER ( ALL ( 'Table' ), 'Table'[Meter_ID] = cur_id )
        )
    RETURN
        IF ( ISBLANK ( cur_code ), "DEV_CODE: NULL", "DEV_CODE: " & cur_code )
    
    Events =
    VAR cur_id =
        SELECTEDVALUE ( 'Table'[Meter_ID] )
    VAR tmp =
        FILTER ( ALL ( 'Table' ), 'Table'[Meter_ID] = cur_id )
    VAR _val =
        CONCATENATEX (
            tmp,
            [Event1] & "
    
    " & [Event2] & "
    
    " & [Event3] & "
    
    " & [Event4] & "
    
    " & [Event5],
            
        )
    RETURN
        _val
    
    MG =
    VAR cur_id =
        SELECTEDVALUE ( 'Table'[Meter_ID] )
    VAR cur_age =
        CALCULATE (
            MAX ( 'Table'[Meter Age] ),
            FILTER ( ALL ( 'Table' ), 'Table'[Meter_ID] = cur_id )
        )
    RETURN
        IF ( ISBLANK ( cur_age ), "METER_AGE: NULL", "METER_AGE: " & cur_age )
    

    2. configure the report

    For more details, 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.

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Tarunika ,

    For display a column as dropdown, you need develop a custom visual to render. Below i provide a sample that use tooltip to achieve your needd without dropdown button.

    Please try below steps:

    1. create meaure with below dax formula

    DC =
    VAR cur_id =
        SELECTEDVALUE ( 'Table'[Meter_ID] )
    VAR cur_code =
        CALCULATE (
            MAX ( 'Table'[Dev code] ),
            FILTER ( ALL ( 'Table' ), 'Table'[Meter_ID] = cur_id )
        )
    RETURN
        IF ( ISBLANK ( cur_code ), "DEV_CODE: NULL", "DEV_CODE: " & cur_code )
    
    Events =
    VAR cur_id =
        SELECTEDVALUE ( 'Table'[Meter_ID] )
    VAR tmp =
        FILTER ( ALL ( 'Table' ), 'Table'[Meter_ID] = cur_id )
    VAR _val =
        CONCATENATEX (
            tmp,
            [Event1] & "
    
    " & [Event2] & "
    
    " & [Event3] & "
    
    " & [Event4] & "
    
    " & [Event5],
            
        )
    RETURN
        _val
    
    MG =
    VAR cur_id =
        SELECTEDVALUE ( 'Table'[Meter_ID] )
    VAR cur_age =
        CALCULATE (
            MAX ( 'Table'[Meter Age] ),
            FILTER ( ALL ( 'Table' ), 'Table'[Meter_ID] = cur_id )
        )
    RETURN
        IF ( ISBLANK ( cur_age ), "METER_AGE: NULL", "METER_AGE: " & cur_age )
    

    2. configure the report

    For more details, 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.

     

  • i dont want blank to be seen if nothing is selected. May i know how to remove that