Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
alandilworth
Partner - Contributor III
Partner - Contributor III

Filter Pane: Having two measures that each rely on a different date field in the same table for filtering

Hello, I am trying to figure out a solution for a situation where I have a table with two measures that each rely on a different date field in the same table for filtering.  Filtering with one of the date fields will return incorrect values for the other measure.  I am either wanting to have one filter to accomplish this, or two filters where the second filter is automatically pre-populated with selections from the first filter. 

My table in the data model is below as well as my pivot table chart.  The two date fields that I need to use for filtering are highlighted.  'RxReceived' is the field needed to properly filter the 'New RX's' column in my pivot table. 'RxComplete' is the field needed to properly filter the 'RX's Shipped' column in my pivot table.

qlikquestion.PNG

qlikquestion2.PNG

3 Replies
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @alandilworth, what about ignoring the other date in each measure?

Sum({<RxComplete>} NewRxs)  // Ignore RxComplete filter

Sum({<RxReceived>} RxShipped)  // Ignore RxShipped filter

 

JG

 

GaryGiles
Specialist
Specialist

Are you trying exclude a filter from certain expressions?  If you want to ignore a field that is filtered in an expression, you include fieldname= in the set analysis for the expression.  Not sure what your pivot expressions are, but it might look something like:

To ignore filters in the RxComplete field in your New Rx expression:

Count({$<RxComplete=>} CustomerId)

To ignore filters in the RxReceived in your Rx's shipped expression:

Count({$<RxReceived=>} CustomerId)

I'm assuming that you have other set analysis criteria in each.

alandilworth
Partner - Contributor III
Partner - Contributor III
Author

I may have done a poor job explaining my situation but I am wanting to put in a filter pane where I can filter my chart by date since it is a rolling document covering several months/years.  My current chart is showing the all time aggregate.  I want to be able to select certain Months/years to only be displayed.  I am using something similar to what you posted for my measures and they are correct until I try filtering by date.  My problem is the 'New RX's' column in my chart is tied to the 'RXReceived' field and needs to be filtered by this field whereas my 'RX's Shipped' column is tied to 'RXComplete'.  If i put in a filter pane with the 'RXReceived' as the dimension, it will return correct results for the 'New RX's' column but incorrect results for the 'RX's Shipped' column and vice versa.