Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
manoranjan_d
Specialist
Specialist

Expression details

=Only({<[primary compare date]=[state2]::[primary compare date]>}amount


can any one explain this expression

15 Replies
sunny_talwar

This expression is going to show you the amount based on primary compare date selection in state2. Rest all selections will be from your inherited state.

manoranjan_d
Specialist
Specialist
Author

Hi Sunny

so suppose if the any other list box  have inhertited state means then the value is also shown as per the selection?

pls correct if i wrong

sunny_talwar

Yes, for instance if you have Year list box in inherited state... your expression value will change based on this list box object

mangalsk
Creator III
Creator III

It will take [primary compare date] from state 2 only and [primary compare date] from inheritate state if you select then also it will not affect, rest all filters like year or region or country will be taken by inheritated fields or if any other alternate state you are selecting.

manoranjan_d
Specialist
Specialist
Author

suppose if want to bring only the year list box and sate 2 in the expression means i have to achieve below expression?

=Only({state2<year=$::year>}amount)



sunny_talwar

This will respect all selections in state2, except year field. For year field it will look at the default state

manoranjan_d
Specialist
Specialist
Author

Hi Sunny,

ok

if i want  particular filed selection with state means can i go with this exp:=Only({state2<year=$::year>}amount)

note: particular filed means year


if i want to all filed as per the selection with state means can i go with this exp:

=Only({<[primary compare date]=[state2]::[primary compare date]>}amount)

note: all filed means year,region and so on in the UI part

sunny_talwar

Not sure what you are trying to say???

manoranjan_d
Specialist
Specialist
Author


as per discussion

=Only({<[primary compare date]=[state2]::[primary compare date]>}amount)


This expression is going to show you the amount based on primary compare date selection in state2. Rest all selections will be from your inherited state.



rest all selections as been discussed above,


suppose if want only particular filed in this expression means how to do this? example year field selection and with state 2