Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a customer that in the attached charts the numbers in the charts should be the same but are not. He would like to know why? The top chart uses 2 dimensions, Report Period (2018, 2019, 2020, 2021), and relation Code (E, S, O) i.e. employee, spouse, other, and the Measure is PMPM_MedPlanPaid, with a filter applied called Core. The bottom chart uses the Report Period, but uses the relation code in a set expression to achieve the same result, and the chart filter of Core still applies. The Set Expression formula is ...
{$<RelCode={'E'}>} PMPM_MedPlanPaid
{$<RelCode={'O'}>} PMPM_MedPlanPaid
{$<RelCode={'S'}>} PMPM_MedPlanPaid
What you are seeing is the a consequence of how chart filters are implemented. A set identifier of "$" does not include chart filters. Remove the "$" and you'll see what I mean.
Also there is an inconsistency in the Measures in the sample you uploaded. The Employee measure references a different master measure. Easy to spot with a cool tool like QSDA Pro.
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
I see what you are saying "the set expressions ignore any chart applied filters" good to know. I removed the filter for core on the bottom chart and placed it in the set expression (and corrected the one measure, played with it so much I must have left that from other attempts), and Viola! the numbers matched.
Thanks
To clarify, "the set expressions ignore any chart applied filters" is incorrect. It's the use of a set identifier "$" that is causing the chart filter to be ignored.
You can leave the $ off and the chart filter will be applied. No need to add the Core= filter into the expression. Meaning just removing the $ should work.
{<RelCode={'S'}>} PMPM_MedPlanPaid
-Rob
I guess I don't understand the use of the Set Identifier. I was under the impression that the $ is used so that global filters are included. I.e. in my example global filter's of Report Period, and Population are applied, and are adhered to when the $ is present.
Your understanding is correct, with a small bit of clarification. Selections (or global filters as you called them) are made in "States". States allow you to create and use different sets of selections. The "State" when you don't do anything special is called the Default state. You can create additional named States as Alternate States. If you want to reference the Default state using a Set Identifier, the identifier for Default is "$".
Each chart is also in a State. In a Set expression, if you omit the Set Identifier, the State of the chart is used. So for a chart in the default state, these two expressions should be identical.
{$<RelCode={'S'}>} PMPM_MedPlanPaid
{<RelCode={'S'}>} PMPM_MedPlanPaid
Here's where things get weird with chart filters. If you leave the set Identifier blank, the chart filter is used. If you specify a Set Identifier ("$" in this case) the chart filter is ignored. That seems inconsistent. I understand this is confirmed as a bug and is being worked on.
So it's not you, it's the implementation of this new thing.
-Rob