Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

Need help with this Measure!

This is the measure I am using to fetch regions from DMT_GEOGRAPHY_POD_MAPPING table based on selection of DMT_FCT_SALES_TARGET[LEVEL_DETAILS]

There no connection between both the tables as of now. So, Each Level Details in DMT_FCT_SALES_TARGET[LEVEL_DETAILS] can either contain a single Region /contain a POD_Code "GCP5" which maps to multiple regions in DMT_GEOGRAPHY_POD_MAPPING table (below is the snip of DMT_GEOGRAPHY_POD_MAPPING table). The Value colun contains region as well as POD_Codes, I seek regione-copy value.

The created measure returns the region for level details containing region but it fails when i select a POD_CD from same slicer.

The error I see is "a table of multiple values is supplied where a single value is selected". Please advice on how to get a single column table when a POD_Code is selected in slicer. Below is the snip of DMT_FCT_SALES_TARGET:

Please advice 🙂

2 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion

    I don't understand the problem description, however, what I can say is SELECTCOLUMNS returns a table and you can't return a table from a measure. It must be a scalar value.

  • dharmendars007's avatar
    dharmendars007
    Memorable Member

    Hello Anonymous , 

     

    If i have understood your query I think you are trying to showing values if the selected value is not present if that so you can pass any text to the condition like the below.

     

    SelectedPOD = SELECTEDVALUE('DMT_GEOGRAPHY_POD_MAPPING'[POD_CD], "No POD selected")

     

    If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes are much appreciated!

     

    Thank You

    Dharmendar S

    LinkedIN