Forum Discussion

ExcelMonke's avatar
ExcelMonke
Impactful Individual
1 year ago
Solved

Using Parameter to Select Zip Codes in Non-Mutually Exclusive Fields

Hello, I am having some difficulty in returning a list of zipcodes from a table using a field parameter, and I am wondering if anyone here has any ideas on how to achieve this? Goal: To show zi...
  • ExcelMonke's avatar
    ExcelMonke
    1 year ago

    Hi Anonymous ,

    circling back on this. Unfortunately your solution did not work for me but the following did (posting in case it could be helpful for others):

    SWITCH(
        SELECTEDVALUE('Market Selector'[Market Selector Order]),
        0,IF(CONTAINSSTRING(VALUES('Market by Zip Code'[Market A]),"Other"),"",VALUES('Market by Zip Code'[Market A])),
        1,IF(CONTAINSSTRING(VALUES('Market by Zip Code'[Market B]),"Other"),"",VALUES('Market by Zip Code'[Market B])),
        2,IF(CONTAINSSTRING(VALUES('Market by Zip Code'[Market C]),"Other"),"",VALUES(''Market by Zip Code'[Market C])),
        3,IF(CONTAINSSTRING(VALUES('Market by Zip Code'[Market D]),"Other"),"",VALUES('Market by Zip Code'[Market D])),
    ""
    )