Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anil_Babu_Samineni

Pivot Calculation Problem

Dear Friends,

Why this pivot table getting problem

Please check the calculation? Sum. Left of everything is working but this is not working

Correct Value is - 30, But here showing 29.

Can i know what is modification i required

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
1 Solution

Accepted Solutions
PrashantSangle

Hi,

do same as whichever solution work?? which work aggr() or adding P_Des-={"All Plants"} in set analysis?

try below

using aggr()

=sum(aggr(sum({<[Master Month]={">=1 <=$(vMaxMonth)"},C_DESCRIPTION={'Reportable','Recordable','Restricted work Cases','Lost Work Cases'}>} S_COUNT),C_DESCRIPTION,P_Des))


or


sum({<[Master Month]={">=1 <=$(vMaxMonth)"},C_DESCRIPTION={'Reportable','Recordable','Restricted work Cases','Lost Work Cases'},P_Des-={"All Plants"} >} S_COUNT)


I will suggest remove calculated dimension and update set analysis, because calculated dimension is performance killer.


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

20 Replies
Not applicable

please share the expression. this may be happening because of DISTINCT clause in your expression

qlikview979
Specialist
Specialist

Hi Anil,

Can you share your file

Regards

tresesco
MVP
MVP

What is the expression you are using for that column? What is the dimension?

antoniotiman
Master III
Master III

Do You have some rounding ?

Anonymous
Not applicable

Hi Anil

What number format are you using? It looks possible it could be a rounding issue as it seems strange the other columns add correctly. Can you share your app or expression please.

Kindest Regards

narendiran
Partner - Creator
Partner - Creator

Hi Anil,

Could you supply few more details, please.

To do cross check you can also check the same with straight table or table. 

awhitfield
Partner - Champion
Partner - Champion

Hi Anil,

please upload your qvw, the right hand column doesn't add up either, it should be 45!

Andy

qlikview979
Specialist
Specialist

Hi Anil,

I Think

Right side last column also showing wrong count 41 ,actual count is 45    please up lode your file.

Regards

Anil_Babu_Samineni
Author

Hey,

Here i am using Two dimensions one C_Description, Which is has 4 names and

P_Des which is has 4 names

Expression for week - =sum({<C_DESCRIPTION={'Reportable','Recordable','Restricted work Cases','Lost Work Cases'} >} S_COUNT)

For YTD - =sum({<[Master Month]={">=1 <=$(vMaxMonth)"},C_DESCRIPTION={'Reportable','Recordable','Restricted work Cases','Lost Work Cases'}>} S_COUNT)

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