Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
gianniko
Contributor III
Contributor III

Count where present in a quarter and not in another one

Hello,

I am having a lot of difficulties with a chart I would like to create. I have 4 quarters and I need to count the number of new enterprises between different quarters as well as the closed enterprises. To do so, if the enterprise is in the first quarter and not in the second, it means that it has closed. On the contrary, if it is not present in the 1st quarter and it appears in the second one, it means it is a new one.

I wanted to be able to choose any 2 quarters and get the result of new/closed enterprises.

If you have any ideas, I will be more than graterful.

14 Replies
gianniko
Contributor III
Contributor III
Author

Just a quick last question isn't it the contrary: when you put MAXString it is for the closed enterprise? Like if is they are present in the 1st and not the 2nd it means it is closed.

Vegar
MVP
MVP

Yes, that was the idea. 

gianniko
Contributor III
Contributor III
Author

Just a quick other question, I want to put a condition "if" in the request . I want to make a fusion of the two lines below, which mean counting the new enterprises only if the municipality name is ΧΕΡΣΟΝΗΣΟΥ

Count(distinct {< [mitroo-03072017.Registration_Number] *=E({<[mitroo-03072017.Date] ={"$(=MINstring({<[mitroo-03072017.Registration_Number]>}[mitroo-03072017.Date]))"}>}) >} [mitroo-03072017.Registration_Number])

if ([Municipality_Unit-municipality_name]= 'ΧΕΡΣΟΝΗΣΟΥ')

 

I tried :

Count(distinct if ([Municipality_Unit-municipality_name]= 'ΧΕΡΣΟΝΗΣΟΥ', {< [mitroo-03072017.Registration_Number] *=E({<[mitroo-03072017.Date] ={"$(=MINstring({<[mitroo-03072017.Registration_Number]>}[mitroo-03072017.Date]))"}>}) >}) [mitroo-03072017.Registration_Number])

without success

 

Thank you!

Vegar
MVP
MVP

You could probably expand your set modifier like this for handling the 'ΧΕΡΣΟΝΗΣΟΥ'

=Count(distinct {< 
   [Municipality_Unit-municipality_name]= {'ΧΕΡΣΟΝΗΣΟΥ'},
   [mitroo-03072017.Registration_Number] *= E({<[mitroo-03072017.Date] ={"$(=MINstring({<[mitroo-03072017.Registration_Number]>}[mitroo-03072017.Date]))"}>}) 
   >} [mitroo-03072017.Registration_Number])

 

-Vegar

gianniko
Contributor III
Contributor III
Author

thank you very much!