Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

data not match straight table and pivot table

i change the expression beacause of change the negative value to zero so i write below script to convert negative value to positive so its again showing mismatch total with same expression. in straight table total showing 440 its correct but in pivot its showing the same 338.15 after change the negative value to zero

if((sum(Aggr (sum({<type={"opportunity"}>}hc_saving)-sum({<Opportunity_ID={"*"} >}EFF_Actual),Opportunity_ID)))<0,0,

sum(Aggr (sum({<type={"opportunity"}>}hc_saving)-sum({<Opportunity_ID={"*"} >}EFF_Actual),Opportunity_ID)))

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

guys i got the solution thanks for your helpful reply,i write a solution please check if you have any other wyt so please let me know.

sum

(Aggr( if(( (sum({<type={"opportunity"}>}hc_saving)-sum({<Opportunity_ID={"*"} >}EFF_Actual)))<0,0,

sum(Aggr (sum({<type={"opportunity"}>}hc_saving)-sum({<Opportunity_ID={"*"} >}EFF_Actual),Opportunity_ID))),Opportunity_ID))

View solution in original post

13 Replies
sushil353
Master II
Master II

Hi,

Please explain your scenario a bit more..

it is insufficient information to comment.

HTH

Sushil

neha_shirsath
Specialist
Specialist

Hi mohammad faizan,

Can you attach some sample data, so that it will be more clear.

Regards,

Neha

Anonymous
Not applicable
Author

please guys check the snapshot and tell me where is the problem the total not match in two different table with same no. of records

neha_shirsath
Specialist
Specialist

Hi Mohammad,

Have you check the both charts expressions?

and also check in excel if both tables values are same or not.

or else please post qvw.

Regards,

Neha

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this expression.

     Sum(Aggr(Your Expression),Opportunity_ID))

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

hi neha,

both the chart expression is same  only the different view is there means same expression with same data straight table total showing 398.150 and pivot showing 399.150 with same quarter Q1

sushil353
Master II
Master II

hi mohammad,

It is hard to analyze but still try to change the option of TOTAL MODE in expression tab.

Try different option like Expression Total or Sum of rows.

HTH

Sushil

Anonymous
Not applicable
Author

thanks kaushik always your soluttion work i know, its work fine.

Anonymous
Not applicable
Author

i change the expression beacause of change the negative value to zero so i write below script to convert negative value to positive so its again showing mismatch total with same expression.

if((sum(Aggr (sum({<type={"opportunity"}>}hc_saving)-sum({<Opportunity_ID={"*"} >}EFF_Actual),Opportunity_ID)))<0,0,

sum(Aggr (sum({<type={"opportunity"}>}hc_saving)-sum({<Opportunity_ID={"*"} >}EFF_Actual),Opportunity_ID)))

hp1.jpg