Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

fmazzarelli
Contributor III

Dimension

Hi Community,

howto do a subtract between 2 dimension? (UI)

I create two dimension

Colli2013

Colli 2014

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

Immagine.png

2 Replies
Not applicable

Re: Dimension

Hello.

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.

Employee
Employee

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)