Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
samvile18
Creator III
Creator III

Calculated Dimension Help

Hi Guys,

Can anyone help with the following problem please?

I have a list of week numbers in the following format Week1, Week2, Week3 etc....I'm currently up to week 13.

What I want to do is create a calculated dimension that looks at the latest week only....so in this case it would bring back Week13, everything I've tried just isn't working.

Any help is greatly appreciated.

4 Replies
pljsoftware
Creator III
Creator III

Hello,

would you like to select only a week? I have not understand your problem. Can you explain it with an if syntax expression?

samvile18
Creator III
Creator III
Author

Yes...I basically only want to select the latest week of data. I'm trying to create some gauges that only report on the latest weeks worth of data...in this case they would be reporting on week13....whereas next week it would move on to week14 etc.

pljsoftware
Creator III
Creator III

Hi Sam,

you can create a variable with the value of maxdate and use this variable to take only the products of the last week.

Example:
If your variable is vEndDate and your date field is Date you can write this formula in your gauge chart

if( Date>(vEndDate-7), sum(Qty))

This only if you want to calculate always the value of the last 7 days.

Regards
Luca

suniljain
Master
Master

if(WEEK = Max(Week),WEEK)

OR

If want summation of amount

Sum(if(WEEK = Max(Week),Amt))