Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Dimension logic

Hi,

Delow is the dimension logic used in the straight table.But here i need to sort the month also as hardcode to Aug in the same expression.

Kindly let me know if it is possible.

Logic : =if([Sold Location] = '000', 'Goal', if([Sold Location] = '999', 'Company', if([Sold Location] = '888', 'District', if(match([Sold Location],'17','18','29','70','76','102','105','129'),[Sold Location]))))

In the above logic i need to include month as well.

Thanks..

11 Replies
sunny_talwar

Did you try both out? and non of them worked?

MarcoWedel

Hi,

instead of using a calculated dimension, another solution might be:

QlikCommunity_Thread_235048_Pic1.JPG

QlikCommunity_Thread_235048_Pic2.JPG

tabSampleData:

LOAD RecNo() as ID,

    Month(Date#(Ceil(Rand()*12),'M')) as Month,

    If(Rand()>0.7,Pick(Ceil(Rand()*11),'000','999','888','17','18','29','70','76','102','105','129'),Ceil(Rand()*10)) as [Sold Location],

    Ceil(Rand()*500) as fact

AutoGenerate 100;

mapSoldLocation:

Mapping LOAD * INLINE [

    SoldLocation, SoldLocationAlias

    000, Goal

    999, Company

    888, District

    17, 17

    18, 18

    29, 29

    70, 70

    76, 76

    102, 102

    105, 105

    129, 129

];

Left Join (tabSampleData)

LOAD Distinct

    [Sold Location],

    ApplyMap('mapSoldLocation',[Sold Location],Null()) as [Sold Location Alias]

Resident tabSampleData;

hope this helps

regards

Marco