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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitians
Creator III
Creator III

Count of a dimension in certain period??

Hello Everyone,

Each supergroup has certain number of brands which is  a dimension this is data about brands launched in a certain period, i have a requiremnt that i need to show the count......when i use count(distinct brand) it shows total brand count irrespective of date so i need the count in that particular launch period.....

I have two variables vStartDate and vEndDate using which in expression i am able to sort launch date..

I am attaching the excel file which has format for the report...

Thanks and Regards,

Rohit

6 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Something like:

count({<launchDate = {">='$(vStartDate)' <='$(vEndDate)'"}>} distinct brand)

(assuming vStartDate and vEndDate are date fields with the same date format as the launch date field).

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
rohitians
Creator III
Creator III
Author

Hello,

count({< SKU_Launch_Date ={'>=$(=Date(vStartDate))<=$(=Date(vEndDate))'} distinct (BRAND))

I had tried thi earlier but it isnt working...

Thanks and Regards,

Rohit

jonathandienst
Partner - Champion III
Partner - Champion III

if you create a text box and enter the exact text =vStartDate, does it display a date in the same format as the SKU_Launch_Date field? If yes, then my post should work for you. If it displays as a number, then your approach should work. If it displays as an expression, then you need to define the variable with a leading = sign.

Otherwise, I suggest that you post a sample of your document.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
rohitians
Creator III
Creator III
Author

Sample Data ..

jonathandienst
Partner - Champion III
Partner - Champion III

I meant your qvw document, rather than the source data

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable

Hi,

Please find attached application.