Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi All
I have 2020 sales target amount in PBI , i can view 2020 target amount using below expression :-
I have add 2021 sales target amount to PBI , may i know how to modify the below expression , in order to display 2021 Target amount :-
Solved! Go to Solution.
@Anonymous , for 2021 this one should work, make sure date table has dates for 2021
Target_2021 = CALCULATE([TARGET_], DATESYTD(DATEADD('Date'[Date],1,YEAR)))
@Anonymous
Update the YTD measure:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as 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 C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi Amit
Below are the expression work fine :-
For 2019 Target amount :-
For 2020 Target amount :-
@Anonymous What is the last date in your Target table and last date in your Date table? This will impact what number (0, -1, -2, -3, etc) that you must use in the DATEADD function.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as 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 C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi Allison
In case now is 2020 Dec and i just add 2021 Target , what is the Date i should enter ? So that i can use 1 for 2021 as Target ?
Paul
Sorry @Anonymous I don't understand your question. Where are you wanting to enter the date?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as 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 C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi Allison
I indicate the end date 2022. ( see my image below ) and my 2021 Target expression =
@Anonymous , for 2021 this one should work, make sure date table has dates for 2021
Target_2021 = CALCULATE([TARGET_], DATESYTD(DATEADD('Date'[Date],1,YEAR)))
| User | Count |
|---|---|
| 53 | |
| 42 | |
| 32 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 72 | |
| 37 | |
| 27 | |
| 24 |