Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi All
My query is if I've a listbox say Fruits
Fruits:
Apple
Banana
Pineapple
Mango
Strawberry
I want to Create a listbox as:
Fruits:
Apple
Banana
Pineapple
Mango
Strawberry
Not Mango
If someone selects Not Mango, it must reflect in all the charts showing + I must be able to select Not Mango and Banana together.
Any kind of help will be appreciated. Thanks in advance.
Regards
Pratyush
Hello Pratyush,
Trust that you are doing well!
Please refer below as workaround:
Script:
Data:
LOAD * INLINE [
Fruits, Trees
Apple, 10
Banana, 20
Pineapple, 30
Mango, 40
Strawberry, 50
];
Concatenate
LOAD 'No Mango' AS Fruits,
Sum(Trees) AS Trees
Resident Data
Where Fruits <> 'Mango';
KPI Exression:
='Trees: ' & If(GetCurrentSelections() ='Fruits: No Mango', Sum(Trees), Sum({<Fruits-={'No Mango'}>}Trees))
Also review the sample application attached herewith.
Regards!
Rahul
Hi Rahul
Thanks for your reply, but this is not what I'm looking for. I cant state this for a single KPI, it is being used for multiple KPIs (on multiple charts as well). This would work fine if I've a single expression. Please let me know if what can I do to make it work everywhere.
Regards
Pratyush
Hi Arvind
I want everything under a single filter.
Regards
Pratyush
Hi Kushal
Thanks for your reply, but this is not what I'm looking for. I cant state this for a single KPI, it is being used for multiple KPIs (on multiple charts as well). This would work fine if I've a single expression. Please let me know if what can I do to make it work everywhere.
Regards
Pratyush
Hi Pratyush,
Please Find the Attachment.
Thanks
Arvind Patil
Here Two solutions of your probelm.
Thanks,
Arvind Patil
Hi Arvind
Thanks for your reply, but this is not what I'm looking for. I cant state this for a single KPI, it is being used for multiple KPIs (on multiple charts as well). This would work fine if I've a single expression. Please let me know if what can I do to make it work everywhere.
Regards
Pratyush
Hello Pratyush,
As a workaround, you can add a Flag field (-1 for No Mango else 1) - Refer below script:
Data:
LOAD *, 1 AS Flag INLINE [
Fruits, Trees
Apple, 10
Banana, 20
Pineapple, 30
Mango, 40
Strawberry, 50
];
Concatenate
LOAD 'No Mango' AS Fruits,
Sum(Trees) AS Trees,
-1 AS Flag
Resident Data
Where Fruits <> 'Mango';
Modify the existing expression(s) as:
= If(Flag=-1, Sum(Trees), Sum({<Fruits-={'No Mango'}>}Trees))
Hope this will help.
P.S.: Create variables to reduce the maintenance of expressions at various charts & KPIs level.
Regards!
Rahul Pawar
Hi Pratyush,
I think That will be solution you need to apply every where.
Thanks,
Arvind Patil
Hi Pratyush,
PFA, Solution.
Regards,
Pankaj