Forum Discussion
How To Set Target(Monthly) through Dax
- Anonymous4 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.
RanHo , On of the way is create a target table using enter data , You can give target based on year end date. and join with your date table and use it
refer my blog
How to Enter Data and Edit it: https://youtu.be/5nE7YGT72kU
You do not want to allocate, but option is there, refer my blog
Distributing/Allocating the Yearly Target(Convert to Daily Target): Measure ( Daily/YTD): Magic of CLOSINGBALANCEYEAR With TOTALYTD/DATESYTD: https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Yearly-Target-Convert-to/ba-p/1476400
- RanHo4 years agoHelper V
amitchandak Sir, is there a way using Dax? like switch or anything like that if possible?
- amitchandak4 years agoSuper User
RanHo ,
A static measure , that you can change as per need
Target = 2000
A DAX Table
Target = row("Date", Date(year(today()) , 12,31), "Target", 2000)
or
Target = row("Date", Date(year(today()) , 12,31), "Year",year(today), "Target", 2000)