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

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
Luminary Alumni
Luminary Alumni

Hi,

Try like this

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


Regards,

Jagan.


Gysbert_Wassenaar

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