Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression to dimension

Is there any code to change an expression to an dimension? (eg. sum(object) )

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Any aggregation function (e.g. sum, avg, count, aggr .. etc) is performed through dimensions so you can't use these function in dimension ...

Hope it helps

Not applicable
Author

DescriptionTYPEJan2011-Jan2012Jan2012-Jan2013
ASDPENC131237898
UHTOPSI123124356

This is an example on what i need to achieve. I have already set TYPE as an expression because 'PE' and 'NC' are two different field. It seems like i'm having two expression but i cant do it.

Not applicable
Author

Hi

just do it in ETL..Pls find below script..hope it will help u..

RawData:LOAD * INLINE [
Product,   Price,     Volume
P1,  10,  40
P2,  12,  50
P3,  20,  60
P4,  5,   70
P5,  15,  80

]
;

Data:LoadProduct,
    
Price,
     
Price As Value,
     'Price'
As 'Measure',
          
Volume
         
Resident RawData;

Load

Product,
 
Price,
   
Volume As Value,
   'Volume'
As 'Measure',
    
Volume
          
    
Resident RawData;
    
DROP Table RawData;

In Chart take Dimension as Measure and in expression Sum (Value)

Regards-Bika