Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Uladzislau_H
New Contributor II

Independent chart

Hello!

I just started working with Qlik Sense Desktop. And I have a little problem.
I have several graphs and filters.  As well as a histogram by month, which should be independent by date filter (but should work with other filters).

When I try to use alternative states for this chart and select any month in the date filter, I only see data for the selected month. In addition, I see incorrect data in this chart when I try to use other filters. 

My expression for this chart:
Sum({$<BILLABLECATEGORY = {"Billable"}>} Log_Hours*0.95)/sum(Log_Hours)

All months selected (without Alternative states), all data is correct:

clipboard_image_0.png

Last month selected (without Alternative states), all data is correct but I see only one month 

clipboard_image_1.png

Last month selected (without Alternative states), one row from other chart selected as a filter,  all data is correct but I see only one month 

clipboard_image_2.png


Last month selected with alternative states (State1), all data is correct but I see only one month 

clipboard_image_3.png

Last month selected with alternative states, one row from other chart selected as a filter,  data in chart is incorrect (data in gauge is correct)

clipboard_image_4.png


How can I fix this?

p.s. excuse me for my English)

1 Solution

Accepted Solutions
Partner
Partner

Re: Independent chart

You don't need alternate states to ignore selections in one field, you can do it like this:

 

Sum({$<BILLABLECATEGORY = {"Billable"}, Datefield=>} Log_Hours*0.95)/sum(Log_Hours)

View solution in original post

3 Replies
Partner
Partner

Re: Independent chart

Try to avoid messing with alternate states if you can. You can remove specific field selections in the set analysis:

 

Sum({$<BILLABLECATEGORY = {"Billable"},

[Month],[Date],...... // put all the date-related fields here. By not assigning an element set, you are telling the engine to ignore them

>} Log_Hours*0.95)/sum(Log_Hours)

Partner
Partner

Re: Independent chart

You don't need alternate states to ignore selections in one field, you can do it like this:

 

Sum({$<BILLABLECATEGORY = {"Billable"}, Datefield=>} Log_Hours*0.95)/sum(Log_Hours)

View solution in original post

Uladzislau_H
New Contributor II

Re: Independent chart

Thank you! 

There was another mistake in my example. I should ignore selection in the second part of my expression too:

Sum({$<BILLABLECATEGORY = {"Billable"}, Datefield=>} Log_Hours*0.95)/sum({<Datefield=>} Log_Hours)

But now it works correctly!