Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a bar chart showing sales by month. In the graph, I have two mesures, this year's sales and also last year's. However, for the current month I want LY sales to only show the sales up to today's date. For example the 2018 sales for Dec should show in my graph not the entire month of Dec-18 but up until the 16th because we are the 17th today. So we were able to do this with the following formula as a measure in the graph with the months as dimension:
Sum({$<Year={$(=Year(Today())-1)}, Month={$(=Month(Today()))}, Day={"<=$(=Day(Today())-1)"}>}[Sales Amount]) + Sum({$<Year={$(=Year(Today())-1)}, Month={"<=$(=Month(Today())-1)"}>}[Sales Amount])
The issue is if we put this formula in a table where the data is broken down by products and not by months (showing all year sales by product) it does not allow you to drill down in your months. If I select the month of May on th graph, the sales values in the table will still show sales of the entire year but I would like them to show only sales of May-18.
Thanks
I was able to do this by using the function Aggr😀
I was able to do this by using the function Aggr😀