Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem to transform an expression into a dimension

Hello Experts QV,

How we could transform an expression into a dimension in order to use it in orhers expressions ?

Specially,  I want to transform this expression if (count(Period_MonthName)>1, MinString(Period_MonthName),Period_MonthName) 

Thanks a lof for your help.

3 Replies
alexandros17
Partner
Partner

You enter in a logical loop because expressions are computed on dimension so your expression

if (count(Period_MonthName)>1, MinString(Period_MonthName),Period_MonthName) 

count and extract min values for which dimension?

You can use expressions in dimension but not with aggregate functions ... try to use variables!!!

Not applicable
Author

Thank you for your feedback.

My dimension is  Period_MonthName ( it's equal to MonthName(Date)).

I have exactly this problem

In a pivot table I have for example

MyMonth => if (count(Period_MonthName)>1, MinString(Period_MonthName),Period_MonthName)   

MyMonth          Applications

July-2011           A01

Feb-2013           A15

July-2011           A02

Feb-2013           A05

March-2013        A02

I want to add a count(Applications) by MyMonth (that is an expression in my case, this is my problem).

The resulat that I want

MyMonth          Count(Applications)

July-2011           2    

Feb-2013           2

March-2013       1

Do you have an idea?

PS/ I just start to working with QlikView ..

Janneke
Creator
Creator

Hi kmegzari,

You can try the aggr()-function as an expression, or you can make a new table (in the script) that is already aggregated and use that.

Table2:

Load MyMonth,

Count(Applications) as Applications_count

From Table1;

Regards, Janneke.