Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

need help

I need the count of customer when user selects particular date in date filter.But if there is no date selected it will show data of ytd .

2 Replies
vishsaggi
Champion III
Champion III

May be Try this in your expression?

= IF(GetselectedCount(Yourdatefield) = 0, Count(DISTINCT {< Year = {"= $(= Max(Year))" } >} Customer), Count(Distinct Customer) )

devarasu07
Master II
Master II

Hi,

Please refer to the attached sample app,

try like below,

if(GetCurrentSelections(Date),count(DISTINCT Barcode),

count({<CurrYTDFlag={'1'}>}DISTINCT Barcode))

Naga suggested fuction GetselectedCount works,

Refer to the attached sample,

= IF(GetselectedCount(OrderDate) > 0, Count(Distinct OrderID),Count(DISTINCT {< Year = {$(=Max(Year))}>} OrderID))

Thanks,Deva