Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate values in the pivot table for the blank cells - Urgent Requirement

Hi Team,

Hoping to get some help from you. Attached is the excel file with the data which I am trying to achieve in Qlik.


The scenario goes like this: 


Table1 in Qlik I am getting it from a expression which is sum of three columns.

Now, I have to create a table, which is Table2 (Major & Minor), the blue highlighted cell values are taken from Table1 and  are put from Table2 as per below rule.

EX: Value of Table1 'Jan' should go to Minor in Table2 'Jan' and so on; Value of Table1 'Feb should go to Major in Table2 'Feb' and so on....


Rules:

JanFebMarAprMayJunJulAugSepOctNovDec
MinorMajorMinorMajorMinorMinorMajorMinorMajorMinorMajorMinor


For the values highlighted in yellow I have to get it by sum of previous and next cell divided by 2.

NOTE: Cell J10 & K10 are consecutive blanks and value should be (I10+L10)/2 for both the cells. I cannot achieve this is Qlik.


Basically, I am using previous and after in expression to achieve this but not getting result for J10 & K10 cells.


Any guidance or suggestions from you all is urgently required.

I do not have licensed Qlik version, so if someone can post the code it will be of great help.


Regards,

Anindya

Message was edited by: Anindya Chandra. Can anyone please reply on this query?

3 Replies
Anil_Babu_Samineni

Try this?

(Sum({<Content = {'=$(=Max(Content)-1)'}>} [Total Items]) + Below(Sum([Total Items]),1)) /

Count({<Content = {">=$(=AddMonths(Max(Content), -2)) <=$(=Max(Content))"}>}>} Content)

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

Hi Anil,

What is the 'Content' attribute you have taken in the expression. Content in excel file I have used as table name. Is it dimensions you are capturing? Sorry, for offbeat questions as I am bit new to Qlik. Please let me know

Anil_Babu_Samineni

Content means Month in your examples?

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