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: 
Not applicable

set analysis script

Hi,

I have data that when product is sold, it shows within the Retail Period (Year) for that part.

I want to count the number of Retaill Periods, by part.

At the moment Parts either have a status of Active (Y) or Non-Active (N)

How can I express this so it only counts the Active Parts, when I choose a Year?

({$<Year={$(=Only(Year))},(Active)=>}[Retail Period])

Thanks,

Paul

3 Replies
MayilVahanan

Hi


Try like this


({$<Year={$(=Only(Year))}, Active= , Parts = {'Y'}>}[Retail Period])

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=Count({$<Year={$(=Max(Year))}, Parts = {'Y'}>} distinct [Retail Period])


Regards,

Jagan.


Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Something like this:

count({$<Year={$(=Only(Year))}, PartStatus={'Active (Y)'}>}[Retail Period])

Replace PartStatus with the name of the field that contains the status values for the parts. Replace 'Active (Y)' with the value that indicates active status.


talk is cheap, supply exceeds demand