Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gianniko
Contributor III
Contributor III

Substraction of 2 expressions

Hi!

I would like to calculate the balance of enterprises which is the substraction of the new and the closed enterprises. Here is the2 expressions for the new and the closed enterprises:

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


=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])

 

I tried to put a minus between this 2 expressions to do the difference but it doesn't work. Any idea?

Thank you!

10 Replies
sunny_talwar

Where exactly are you trying to do this calculation? I mean to ask which type of object?

gianniko
Contributor III
Contributor III
Author

I want to subtract the first request by the second! (they are  2 different request your can see the MIN in the first and the MAX in the other one)

sunny_talwar

But is there a dimension? What is it?

gianniko
Contributor III
Contributor III
Author

Yes it counts a number, it's written Count(…) as you can see

sunny_talwar

I feel like we are living in two different worlds. I am asking how are you, and you are telling me that my car is giving me problems. Do you even understand my question?

gianniko
Contributor III
Contributor III
Author

Apparently not, sorry..

sunny_talwar

Do you at least understand what a dimension is? If you do.... all I am asking is that are you using this in a chart object where you have some dimensions? What are those dimensions?

Does that clarify?

gianniko
Contributor III
Contributor III
Author

It is used in a table but as a measure not a dimension.. Not sure I understood though..

sunny_talwar

Are you able to share a sample where we can see the issue? If not, then may be someone else might be able to help you better here