Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
Last month selected (without Alternative states), all data is correct but I see only one month
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
Last month selected with alternative states (State1), all data is correct but I see only one month
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)
How can I fix this?
p.s. excuse me for my English)
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)
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)
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)
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!