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

getselectcount issue

hi handsome I want to show the default value such as 2019 sales when no fields selected and dynamic value when some fields selected, so i use if ,but how to express no fields selected? looking forward for your reply, thank you.
2 Replies
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi 

Try this

If(GetselectedCount([Year])=1,Sum(Value),Sum({<[Year]={2011}>}Value))

Hope it helps

Thanks

Thanks and Regards
Kashyap.R
tresesco
MVP
MVP

GetSelectedCount() works on single field, here you would need a function that works on any/all fields. Try using GetCurrentSelections(), like:

If(Len(GetCurrentSelections())>0,Sum(Value),Sum({<[Year]={2019}>}Value))