Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hello,
I am trying to make a comparison of sales using the YTD function in PowerBi desktop. I have both the DAX-formulas working for the current year and last year I am however stumbling upon a problem. The table I use to show the data only shows the sales of last year up to the current date. I want it to show all data for the remaining months(july - december). Is there anyway to do this?
It sounds like your function is calculating based on TODAY() showing all totals up to todays date. If you want to include remaining months you will need to change TODAY() to 12/31/2019.
If you post your DAX it might be easier to explain.
Thank you @Anonymous for your reply. For the current year sals this is the formula;
@Anonymous ,
You just need to create an additional measure using DAX as below:
Remaining = CALCULATE ( [Total Sales]; DATESBETWEEN ( Datetable[Date]; TODAY (); DATE ( YEAR ( TODAY ); 12; 31 ) ) )
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @v-yuta-msft ,
Thanks for your reply. However I get an error on the first TODAY (); in the formula.
@Anonymous ,
What does the error message say? Could you please share more details?
Regards,
Jimmy Tao
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
User | Count |
---|---|
92 | |
92 | |
84 | |
80 | |
49 |
User | Count |
---|---|
146 | |
137 | |
109 | |
68 | |
55 |