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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Displaying dimension values in a chart when there are no records for the expression to calculate

I have two customers, one of which has some purchase and sales transactions and one which doesn't.

I would like to create a chart which sums the purchase and sales totals for each client AND displays both clients, even though one will not have any transactions to sum.

Many thanks in advance for any suggestions

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Create a Straight Table

Dimension = CLIENT_NAME

Tick Suppress When Value is NULL

Tick Show All Values

Expressions

Purchase : SUM({<TransactionTypeCode = {'P'}>}Quantity)

Sales : SUM({<TransactionTypeCode = {'S'}>}Quantity)

Purchase Total Value : SUM({<TransactionTypeCode = {'P'}>}Amount)

Sales Total Value : SUM({<TransactionTypeCode = {'S'}>}Amount)

SAMPLE.JPG.jpg

View solution in original post

15 Replies
MK_QSL
MVP
MVP

Like This?

Not applicable
Author

Hi Manish,

Thanks for the quick response - unfortunately I've only got the personal edition so can't open your test qvw - Could you let me know what the fix is and I'll give it a go.

many thanks

john

Not applicable
Author

If you want to display zero-values go to the presentation tab on the object and uncheck "Suppress zero values."

MK_QSL
MVP
MVP

Go to presentation tab and untick suppress zero

Not applicable
Author

Hi Christian

Unchecking the suppress zero values didn't work; I guess because there aren't any values in there at all?

PrashantSangle

Hi john,

You can achieve this by un check Supress zero value option in presentation tab.

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 🙂
Not applicable
Author

I'd say try unchecking suppress missing on the presentation tab and then try unchecking suppress nulls on the dimensions tab.

MK_QSL
MVP
MVP

Create a document by adding below in your script.

Load * Inline

[

  Customer, Purchase, Sales

  A, 100, 200

  B, 120, 240

  C, ,

];

Now Create a Line Chart or Bar Chart..

Dimension = Customer

Expression = SUM(Purchase) + SUM(Sales)

Now Go to Presentation tab and untick Supress Zero Values...

Hope this helps...

Not applicable
Author

Thanks - I'll give it a try and let you know