Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create a calculated dimension

Hello People, this is my first question so be good with me!

I have the following dilemma, I have to categorize sales in one dimension according to their sale.

Example:

the amounts of product sales in a month are over 1,000,000 must have category A, which are less than 999,999 should be category B.

this is more or less what it should show ...

if not achieve it in the script or a variable or Set analisys. I'm really lost ...

please your help.

3 Replies
Chanty4u
MVP
MVP

=if(productsales>1,000,000  [Catagory A]  and  productsales<999,999   [Catagory B] )

Kushal_Chawda

Creating calculated dimension is not good practice, it consumes more resources, instead you can create the same in the script or create the expression.

in script,

LOAD *,

if(sales>=1000000 ,'A' ,'B') as Category

..

FROM table


Expression:


if(sum(sales)>=1000000 ,'A' ,'B')

Not applicable
Author

You should create an additional field in the script as

Load *,

if([product sales]>=1000000,'A', 'B') as Category

From

Your Table;

Regards,

Anjali Gupta