Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

only one expression change for one filter

Hi,

I want chart where one expression changes for only one filter selection (day) and other expression change for every filter.

I am using day=p(day) for one expression but by using this, It is changing this expression but putting all other expression as 0.

So I want to remove all other rows with 0.

Thanks

Amit

8 Replies
sunny_talwar

I sort of understand what you are looking for, but would be easier to show how to implement this if you can share a sample with us

sathishkumar_go
Partner - Specialist
Partner - Specialist

Please attach sample application with sample data

-Sathish

rubenmarin

Hi Amit, as said above is hard to say without a sample but maybe for your only-day expression something like:

=If(GetSelectedCount(Day), sum({1<Day={$(=GetFieldSelections(Day))}>}Value), sum({1}Value))

If something is selected in the Day field, returns the sum of Value ignoring all selections and fixing Day with the selected values in that field (expression needs some changes if Day is not numeric).

Your p(Day) can fail when selections in other fields filters Day field, which also affects the p(Day), as it limits the possible values.

Not applicable
Author

Hi,

You are right for p(day) of logic. But when I used your logic, It is not working. Day format is DD/MM/YYYY. What needs to be changed for that.

rubenmarin

Hi Amit, so your 'Day' is not only a Day number but a complete Date? Maybe with:

=If(GetSelectedCount(Day), sum({1<Day={'$(=GetFieldSelections(Day, Chr(39) & ',' & Chr(39)))'}>}Value), sum({1}Value))

Hope this works but If doesn't works please upload a sample, it's hard to guess your data with only what you said in the first post.

sasikanth
Master
Master

hi ,

There are two things here

1) if you want to enable the expressions based on the selections made in filters then

   Use Conditional Enabling. like

For Filter1:   getSelectedCount(filter1)>0

For Rest :getSelectedCount(Filter1)<=0

OR

If you want to show both Expressions but should not respond for Filter 1 then use set analysis

like Sum({<Filter1=>}Value)

Not applicable
Author

Hi,

I LOADED DATA FOR ONE RESOURCE R1

Its like I want ex hour to change only for filter timebyday and not for filter classification.

One fact is this there are so many filters like classification. I am only using classification here.

rubenmarin

Hi, I applied my proposed expression to ex hour and (if I understood it right) it's working as you said.