Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor III


Hi Community,

howto do a subtract between 2 dimension? (UI)

I create two dimension


Colli 2014

I need to subtract Colli2014 - Colli2013 with the aim of exposing the difference


2 Replies
Not applicable

Re: Dimension


The dimensions store qualitative values to characterize the facts. The fact tables are measurable or quantitative. You must have the measurables values in a fact table to perform arithmetic operations. If you can, please publish more information about the stored data or its structure. Regards.


Re: Dimension

Are you trying to subtract the values in those dimensions ?  Or are you trying to subtract measure values that are associated with the values in those dimensions ?

for the former try:   only(Dim1) - only(Dim2)   ... if there is only 1 possible value for Dim1 and only 1 possible value for Dim2 , then the subtraction is possible so long as both are numbers.

For the latter try something like

sum( {<Dim1={'Value1'}>} Sales)   - sum( {<Dim2={'Value2'}>} Sales)