Skip to main content
Announcements
WEBINAR April 23, 2025: Iceberg Ahead: The Future of Open Lakehouses - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
D_K_Singh
Contributor III

Not showing correct sum amount in Bar chart with association

Hello Genius,

I am new to qlik sense and I need your support.

I have three table(A,B,C) in which CID is common. In  Table B and C, value for Budged_id and Spend_id is Common but not common as per CID.

I have associated the table as per CID. now I am trying to show comparison between budget and Spend amount as per Budget_Id but it is not giving correct amount for Spend. If I create seperate chart as per Budget_ID and Spend ID then value shows correct amount.

Please provide your help.qlikissue.JPG 

Labels (5)
2 Solutions

Accepted Solutions
Vegar
MVP

What about renaming the spend and budget field names so they are identical and the  concatenate the two into one transaction table. Add a field to that table that indicates if it is a budget or spend transaction.

View solution in original post

marcus_sommer

Meant is to merge both tables by concatenating them (union in sql) by harmonizing all field-names and data-structures as possible - an extra single field containing the source-information is enough to be able to differentiate between them in dimensions, selections and set analysis conditions.

Reason is that spend and budget have mainly the same information - only the point of view is different. Such measurement is usually very simple and solves many challenges within the data-model - especially getting all available data in each view (which isn't possible by missing keys on any side with table-associations) and in associating common dimensions.

View solution in original post

6 Replies
Vegar
MVP

That's really an odd behavior of a measure.

Do you use the same measures in both  charts?

Do you use the same application/script when creating those charts.

How is the datamodel? Can you send a picture of how it looks or post the script you are using?

Vegar
MVP

I did another look. Your app tsbles are joined by CID. In the joined table you have BudgetID is dimension, and if you look at which CIDs that are associated to each Budget ID you will find that the chart is correct.

 

For the  single measure chart showing spend you dont use the same dimension for the bars.

You might want to find another way to associate the tables  in your application.

D_K_Singh
Contributor III
Author

Yes dear, you are right. I am not sure how to associate these table so that I can get the correct value.model.JPGscript.JPGdatamodel.JPG

Vegar
MVP

What about renaming the spend and budget field names so they are identical and the  concatenate the two into one transaction table. Add a field to that table that indicates if it is a budget or spend transaction.

D_K_Singh
Contributor III
Author

I am not clear on this. Can you please do it for me.

marcus_sommer

Meant is to merge both tables by concatenating them (union in sql) by harmonizing all field-names and data-structures as possible - an extra single field containing the source-information is enough to be able to differentiate between them in dimensions, selections and set analysis conditions.

Reason is that spend and budget have mainly the same information - only the point of view is different. Such measurement is usually very simple and solves many challenges within the data-model - especially getting all available data in each view (which isn't possible by missing keys on any side with table-associations) and in associating common dimensions.