Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Selectedvalue Date Slicer not populating

Hi 

 

I am having an issue with the selected value function not populating correctly. 

 

I have a list of policies and their inception date (policy start date) and expiry date (policy end date) spanning several years. I want users to be able to view only policies which are in-force/live at 1st of each month using a slicer. 

 

I created an unrelated date table which will be used for the slicer. When a user selects a date from the slicer I want to tag or filter only policies which are in-force at that date. If the slicer date is between the inception and expiry date it would be considered in-force. 

 

In my main able have a selected value measure 

Selected_Date = SELECTEDVALUE(Date_Table[Date].[Date])
which I thought would pull the selected value in slicer through to my main table. This measure populates blanks. I have a card with the selected value measure to check the date populates but it doesnt. 
 
I have a second IF statement measure which checks if the slicer date is between the inception and expiry date and tags the row as "InForce" or "exclude". But this won't work until the selectedvalue funtion does. 
 
Have looked at forums online but can't see people having issues with the selected value function. 
 
Any tips or help would be greatly appreciated. I will upload a dummy pbix which shows the problem. 
thanks!
  • Change the measure to 

    Selected_Date = 
    SELECTEDVALUE(Date_Table[Date])

     

    I would also recommend you turn off "Auto time/Date" in the file's options under "Data Load" (since have created a date table with columns), and mark the Date table as such in the ribbon. (but save a backup file in case you need to redo measures)

5 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Icon for Community Champion rankCommunity Champion

    Can you make the download link for the sample PBIX file public please?

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    SelectedValueIssue 

     

    Apologies my company blocks external sharing. 

    New link here should be public. 

     

    thank you

  • PaulDBrown's avatar
    PaulDBrown
    Icon for Community Champion rankCommunity Champion

    Change the measure to 

    Selected_Date = 
    SELECTEDVALUE(Date_Table[Date])

     

    I would also recommend you turn off "Auto time/Date" in the file's options under "Data Load" (since have created a date table with columns), and mark the Date table as such in the ribbon. (but save a backup file in case you need to redo measures)

    • Anonymous's avatar
      Anonymous
      Not applicable

      Paul thank you so much - this worked!

      An annoying small change to make this all work but much appreciated. 

      Adam

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous ,

         

        Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thank you very much for your kind cooperation!

         

        Community Support Team _ Caitlyn Yan


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