Qlik Community

Qlik Sense Data Connectivity

Discussion board where members can learn more about Qlik Sense Data Connectivity.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

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

Highlighted
Contributor III
Contributor III

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)

Highlighted

But is there a dimension? What is it?

Highlighted
Contributor III
Contributor III

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

Highlighted

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?

Highlighted
Contributor III
Contributor III

Apparently not, sorry..

Highlighted

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?

Highlighted
Contributor III
Contributor III

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

Highlighted

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