I have the below DAX calculations for a non-standard date table calculation, for YTD, LY and 2 years ago. I have tried, but I cannot seem to find a way of totaling these. Someone mentioned grouping the dates, but not sure how to do this
. Also any help on making my Sales YTD formula more dynamic, instead of having to change the year every time would be great (The same formula format on the others, wont work on YTD for me)
@Greg has put together a great article with pretty much all you need to know in regard to this topic, it also covers calculating totals - you can find that here.
.
If you need further assistance please provide a sample PBIX
Thanks for posting your question @Nurry90. To receive a resolution in a timely manner please make sure that you provide all the necessary details on this thread.
Here is a potential list of additional information to include in this thread; demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.
Including all of the above will likely enable a quick solution to your question.
Hi @Nurry90, weāve noticed that no response has been received from you since the 16th of October. We just want to check if you still need further help with this post? In case there wonāt be any activity on it in the next few days, weāll be tagging this post as Solved. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the checkbox. Thanks!
Hi @Nurry90, a response on this post has been tagged as āSolutionā. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box. Thanks!
Apologies for the late response. I have used the above post from @Greg, and it is partially working for some weeks. See below. Notice from FY2020 - WK12 to FY2020- WK27 the āTotal Last Weekā is not following the formula. And suggestions what this could be?
Also, (see bottom screenshot) I do not have full FY2019 data loaded yet, however the āTotal Last Weekā sales are showing up.
I have used this formula for the "Total Last WEek"calculation,
total last week =
VAR _ListOfWeeks = SELECTCOLUMNS(
ADDCOLUMNS(
VALUES( āDate Tableā[FYWeeknYear] ),
ā@LWā, CALCULATE(
MAX( āDate Tableā[FYWeeknYear] ),
FILTER(
ALL( āDate Tableā ),
āDate Tableā[FYWeeknYear] < EARLIER( āDate Tableā[FYWeeknYear] ) )
)
),
āWeeksā, [@LW]
)
VAR _Result = SUMX(
FILTER(
ALL( āDate Tableā ),
āDate Tableā[FYWeeknYear] IN _ListOfWeeks ),
[Total Sales]
)