Forum Discussion

mng's avatar
mng
Icon for Advocate I rankAdvocate I
3 years ago
Solved

How to create a drop down list that returns a value

Hi, I understand how to use a splicer to create a drop list using values from a column in my table to filter that column but what I want to is create a drop list from values that are not in my t...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi mng ,

    You can update the formula of measure [trans_sel_col] as below and apply the visual-level filter with the condition (trans_sel_col is 1) as below screenshot:

    trans_sel_col = 
    VAR trans_selection =
        SELECTEDVALUE ( 'Table'[Column1] )
    VAR _opr =
        SELECTEDVALUE ( 'Query1'[TRANS_OPR] )
    VAR _swg =
        SELECTEDVALUE ( 'Query1'[TRANS_SWG] )
    VAR _clr =
        SELECTEDVALUE ( 'Query1'[TRANS_CLR] )
    VAR _cntr =
        SELECTEDVALUE ( 'Query1'[TRANS_CNTRC] )
    RETURN
        SWITCH (
            trans_selection,
            "Trans Any",
                IF ( _opr = "Y" && _swg = "Y" && _clr = "Y" && _cntr = "Y", 1, 0 ),
            "Trans Opr", IF ( _opr = "Y", 1, 0 ),
            "Trans Sw", IF ( _swg = "Y", 1, 0 ),
            "Trans Clr", IF ( _clr = "Y", 1, 0 )
        )

     

    If the above one can't help you get the desired result, please provide some sample data in your table “Query1” (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards