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

Announcements
Share your agentic AI experience, learn from others, and earn a new badge: Put Agentic AI to Work
cancel
Showing results for 
Search instead for 
Did you mean: 
Pomna
Creator III
Creator III

Pivot table

Hello ,

I need help with my pivot table. Everything works good but I need the 2020 Goals and 2020 Apps columns to show yearly total for each position.  That is  each position should show numbers for  all quarters for 2020 Goals and 2020 Apps.  For example if Baker had the following goals

Q1   0

Q2  7

Q3  1

Q4  9

then the Baker row in the 2020 Goals column should show 17

For 2020 Applications  for the Baker role 

Q1   2

Q2  1

Q3  1

Q4  0

then the Baker row in the 2020 Apps column should read 4

 

Please see the pivot table and code used below. Thank you

//Code to get 2020 Apps

Count({$<Mapped={"Y"},Year={'2020'},Quarter=>} Total <[Role Group]> Distinct [Applicant ID])

//Code to get 2020 Goals

if($(vApplicationCount) > 0 or $(vApplicationGoals) >0,Sum({$<[Applicant Submit Date]=,Year=, [Quarter]=, Mapped=>} Total <[Role Group]> [Goals]))

Pomna_0-1609954251994.png

 

1 Reply
Anil_Babu_Samineni
MVP
MVP

If i understand correctly, Add this in script

Load * Inline [
Dim
1
2
3
];

And then your dimension : Pick(Dim, Quarter, '2020 Goals')
Your measure : Pick(Dim, Sum(Goals), Sum(TOTAL Goals))

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