Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculated dimension

Hi Experts,

i have to make a calculated dimension for the last (recent) 10 weeknos in pivot table.

can someone please help me with the expression

5 Replies
Anil_Babu_Samineni

May be Calculated dimension like

I assume you may have Week function like Week(DateField) as Week

If(Week <= 10, Week)

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
Not applicable
Author

anil,

i want to list the latest 10 weeks

Anil_Babu_Samineni

If possible can you please share sample

OR this for Calc. dimension as usual

If(Week >= Max(Week)-10 and Week <= Max(Week), Week)

Or this for expression

Sum({<Week = {">=$(=Max(Week)-10) <=$(=Max(Week))"}>} Sales)

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
Kushal_Chawda

It would be difficult to suggest something on this. Please provide more information. What are dimensions in pivot table and expressions in pivot table? Providing sample will give you quicker and better solution

hic
Former Employee
Former Employee

I would define this in the script by e.g.

If((WeekStart(Today())-WeekStart(Date))/7<10,WeekName(Date)) as WeekName,

See also

https://community.qlik.com/blogs/qlikviewdesignblog/2013/06/10/relative-calendar-fields

HIC