Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dominic_marchan
Contributor III
Contributor III

Drill down

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

Labels (2)
1 Solution

Accepted Solutions
dominic_marchan
Contributor III
Contributor III
Author

I was able to do this by using the function Aggr😀

View solution in original post

1 Reply
dominic_marchan
Contributor III
Contributor III
Author

I was able to do this by using the function Aggr😀