Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
tester_sogeti
Contributor

Help with calculated dimension

Hello all,

So i have this dimension:

=if(($(maxIndexFY_Q)-4)<=[Index_FY-Q],[Index_FY-Q])

where:


Index_FY-Q: field, it is a number for each quatrimester in ascending order from the 1st Q of the 1st Fiscal year. it has only this values : [1 2 3 4 5]

maxIndexFY_Q = maxstring({<[Index_FY-Q]=>} [Index_FY-Q])         //get the highest value of Index_FY-Q, in my case it returns 5


Somehow i can't get this dimension to work. Why? I ave done more calculated dimensions and didn't have a problem.

The objective is to represent the 5 last quatrimesters (including the current one). (can't use new script dimension)


Thanks for help ^^

1 Solution

Accepted Solutions

Re: Help with calculated dimension

If you are calculating left hand side, You may need TOTAL keyword

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

4 Replies

Re: Help with calculated dimension

May be this

=If(MaxString(TOTAL {<[Index_FY-Q]=>} [Index_FY-Q]) <= [Index_FY-Q], [Index_FY-Q])

Re: Help with calculated dimension

If you are calculating left hand side, You may need TOTAL keyword

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

Re: Help with calculated dimension

or store your variable with an equal sign (without TOTAL)

tester_sogeti
Contributor

Re: Help with calculated dimension

This worked perfectly, i only changed it like this: maxIndexFY_Q = maxstring({<[Index_FY-Q]=>} [Index_FY-Q])


I also realized that i can use as dimension Index_FY-Q and at dimension limits restric to 5 largest! I didnt realize until now, but anyway thanks for the help!