Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have created an Inline function
Load * Inline [
Dimension
Underwriter
Underwriter To Sector
Trade Sector
SecToUnd
];
I am using this in a chart conditionally. When i select Underwriter, dimension of the chart should be Underwriter.
When i select 'Underwriter to Sector' it should select a drill down dimension i.e 'Underwriter to Sector'
I have used =SubStringCount(Concat(Dimension, '|'), 'Underwriter') for Underwriter
and =SubStringCount(Concat(Dimension, '|'), 'Underwriter to Sector') for Underwriter to Sector.
But its not coming properly. I know the reason this is because of the substringcount considers underwriter in both the cases.
Please help me how to solve this.
I have attached the QVW. Please look into it.
Thanks in advance,
Keerthi
I ran into the exact same problem. Instead of this code: =SubStringCount(Concat(Dimension, '|'), 'Underwriter'), you could use this code instead for your conditional expression:
GetFieldSelections(Dimension) = 'ALL' or
Index(GetFieldSelections(Dimension, '|'), 'Underwriter') > 0
The GetFieldSelections(Dimension, '|') function will build a list of bar separated selections from the Dimension field with one caveat - when EVERY field is selected in Dimension, GetFieldSelections(Dimension) returns 'ALL'.
If you still run into selections like 'Underwriter' and 'Underwriter to Sector' not working because 'Underwriter' appears in both, you can work around this by changing one of the values slightly, remembering that QlikView is case-sensitive which means 'UnderWriter' or 'Under writer' is not the same as 'Underwriter'.
In my case, I had 'Age' and 'Age Group' as dimensions, and selecting 'Age Group' also caused 'Age' to display - I overcame it by changing 'Age' to 'AGE' - problem solved.
You may also want to add a Calculation Condition on the General tab of the chart similar to this:
GetSelectedCount(Dimension) > 0 to prevent the chart from displaying when no dimensions are chosen.
-Mark
Hi,
Please find the attached qvw.
Hope it will help.
Regards
Arun Goel
Thanks a lot arun Its the simpler way to do
Thanks Miller