Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
fmazzarelli
Partner - Creator III
Partner - Creator 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

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.

JonnyPoole
Employee
Employee

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)