Forum Discussion

Nimai123's avatar
Nimai123
Post Patron
6 years ago
Solved

DAX-SelectedValue

Can I dynamically pass a date value from the slicer in my calculated column?

 

And if I use selectedvalue DAX for a calculated column it's giving a blank result instead of showing what I have selected in the date slicer.

 

 

amitchandak 

 

 

 

4 Replies

  • AllisonKennedy's avatar
    AllisonKennedy
    Community Champion

    You cannot do anything dynamic in a calculated column, but you can do in a calculated MEASURE. Try rewriting your formula as a measure instead of column (you may want to consider ITERATORS in this case such as SUMX)

     

    Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 

     

    If you found this post helpful, please give Kudos.

    I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 

    https://sites.google.com/site/allisonkennedycv

    • Nimai123's avatar
      Nimai123
      Post Patron

      My calculated Column  = SelectedValue(Table[Date])

      And I cannot make a measure because I am using this Calculated Column for a DATEDIFF.

  • Nimai123 , Agree to what AllisonKennedy is said, You can not create a column using slicer value. The best is to create a measure that will give you similar results. If you can share what you are trying, we can help