Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
tschullo
Creator III
Creator III

Cyclic Group with if statement - Selection selects > 1 field

I have a sales budget dashboard that with three panes (charts) .  The first has the cyclic group with sales person as one dimension and customer as the second and includes data for EXISTING budgeted customers.  The second has sales person as the dimension and shows data for NEW customers only. The third shows the totals by sales person.

My issue was that in the first pane for EXISITING data, NEW customers were being listed along with the EXISTING customers, but only if I didn't filter by a specific sales person. If I select a specific salesperson, the "exclude zero values" rule applies, but if I don't it is ignored (and the values are zero)..

So I added an IF statement to my cyclic group: =if(FYbudgetCode<3, [CustomerName]). //where 3 is NEW

So now when I select a customer name, the current selections box shows my customer as selected as well as "FYbudgetCode = 2".

I don't want FYbudgetCode to be selected.

Can anyone please help me with this?

Thanks,

Tony

1 Solution

Accepted Solutions
tschullo
Creator III
Creator III
Author

Than you, Gysbert!

You got me thinking along the right direction. The reason it was not working when I had multiple salespeople is because I had added two columns outside of the main view of the chart where I neglected to wrap the field in an "only()" statement that filters them down to EXISTING.

Thanks for responding.

View solution in original post

2 Replies
Gysbert_Wassenaar

Perhaps you can use set analysis expressions instead of messing about with calculated dimensions. Suppose you now have an expression sum(Sales). To exclude new customers you could change it to sum({<FYbudgetCode={'<3'}>}Sales).


talk is cheap, supply exceeds demand
tschullo
Creator III
Creator III
Author

Than you, Gysbert!

You got me thinking along the right direction. The reason it was not working when I had multiple salespeople is because I had added two columns outside of the main view of the chart where I neglected to wrap the field in an "only()" statement that filters them down to EXISTING.

Thanks for responding.