# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

## Calculated dimensions in measures

Hi Experts,

Is it possible to use an calculated dimension in an measure?

I've created an dimension to group some values, Now I want to use that dimension in an measure, is it possible.

1 Solution

Accepted Solutions
Esteemed Contributor

## Re: Calculated dimensions in measures

create your dimension in the script and then you can use it

4 Replies
Honored Contributor II

## Re: Calculated dimensions in measures

Hi,

Yeah we can do that by using set analysis,

example,

Expression = SUM({<Employee = {"=Rank(SUM(Salary),4)<=10"}>}Salary)

above expression will show top 10 employee (as Cal.dim)  by Sales.

Tks, Deva

Not applicable

## Re: Calculated dimensions in measures

Hi Deva,

Thanks for the response but was the Employee an Calculated dimension?

This is what I'm trying to do.....

Create an Dimension called MedicineGroup

if (ReportingGroup2Name like 'Cephalosporins*' , 'Cephalosporins'

,if (ReportingGroup2Name like 'Co-trimoxazole*' , 'Co-trimoxazole'

,if (ReportingGroup2Name like 'Macrolide*' , 'Macrolide'

,if (ReportingGroup2Name like 'Other Antibiotic*' , 'Other Antibiotic'

,if (ReportingGroup2Name like 'Ciprofloxacin*' , 'Ciprofloxacin'

,if (ReportingGroup3Name like 'Co-amoxyclav*' , 'Augmentin'

,if (ReportingGroup3Name like 'Amoxicillin*' , 'Penicillin - Other'

,if (ReportingGroup3Name like 'Flucloxacillin*' , 'Penicillin - Other'

,if (ReportingGroup3Name like 'Penicillin*' , 'Penicillin - Other'

)))))))))

then I want to use the MedicineGroup in an Measure

Expression = SUM( {\$ <MedicineGroup = {"Augmentin"}>} Record_Counter)

But the MedicineGroup does not appear when typing it in expression editor

Hope this will help.

Thx Erenst

Esteemed Contributor

## Re: Calculated dimensions in measures

create your dimension in the script and then you can use it

Not applicable

## Re: Calculated dimensions in measures

Hi Omar,

Thanks very much.

Erenst