Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

DAX measure cannot be added to visuals

I have a measure that takes Slicer value( format: whole number) and subtract years from date. But the measure cannot be added to visuals. I can add it only on TOOLTIP. PFB calculation for measure:

 

To_Date2 =
var NoOfYear = SELECTEDVALUE(Slicer[Selection])
var SOY = MAX('Data Table'[Start Date])
var d = DAY(SOY)
var m = MONTH(SOY)
var y = YEAR(SOY) - NoOfYear
Return DATE(y,m,d)
 
I need to create line chart as well as slicer with the measure.
 
Regards

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Trying to add to X axis, However, I am sorry but not able to understand Disconnected Table trick . My Slicer(Selection) is already a disconnected table.

  • v-xiaotang's avatar
    v-xiaotang
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

    Thanks for reaching out to us.

    could you give some sample data and expected output? thanks.

     

     

    Best Regards,

    Community Support Team _Tang

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