Forum Discussion

RanHo's avatar
RanHo
Helper V
4 years ago
Solved

How To Set Target(Monthly) through Dax

Good day Guys, i just want to ask how can I set target using dax, like that yellow bar on my sample photo. That was my Target for the year 2021, what if I'm going to add different value target for ye...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi RanHo ,

     

    According to your description, you want to dynamically set the Target based on the different year.

    If so, please try:

    target = SWITCH(MAX('Table'[Date].[Year]),2019, 51108, 2020,3528,2021,2465,2022,5673) 

     

    If you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

     

     

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