Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

4 Replies
sunny_talwar

May be this

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

Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

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

Anonymous
Not applicable
Author

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!