I am new to this forum and looking to get some insight on an issue I can’t seem to figure out. What I would like to see in a simple table format is by Customer, total sales for the current year values by filtering the Year and Quarter, but then also show as a column all of Previous Years sales for those customers.
So, if I filter 2021 and Q1, show all Sales data for Q1-2021 and then have a column that shows all of 2020 sales for that customer. I’m thinking it needs to be with a CALCULATE and FILTER function but can’t seem to get it.
You will always get the best response/support on the forum if you provide not only a clear explanation of your issue, but a PBIX work in progress and a mockup of the results you want to see.
If your data are sensitive, we have instructions for masking confidential info, as well as multiple free tools to create datasets and data models representative of your problem:
YTD Sales, (can never be bigger as cum. sales, (time slicer selection possible)
YTD7 Sales =
Var YTD71 = CALCULATE( [Total Sales] , ALLselected(DateT), DATESYTD( DateT[Date] ))
//if the cumulative sales is smaller as YTD, due to time slicer, take cum sales
Var YTD71Adj = IF([Cum7 Sales] < YTD71, [Cum7 Sales], YTD71)
return
IF([Total sales] <> 0, YTD71Adj, BLANK())
Sales previous years ( depending on the time slicer)
Hi @cobrecht, did the response provided by @BrianJ and @deltaselect help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query.
I hope that you are having a great experience using the Support Forum so far. Kindly take time to answer the Enterprise DNA Forum User Experience Survey, we hope you’ll give your insights on how we can further improve the Support forum. Thanks!
Hi @cobrecht, we’ve noticed that no response has been received from you since the 26th of May. 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.
Hi @cobrecht, due to inactivity, 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.