Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
chiranjivdas
Contributor III
Contributor III

Difference in Count of Synthetic Key Values

I have data from two sources:

File Name: Production

File Name: Sales

(please see attached)

I uploaded them and the synthetic Key is Model. In Production, there are 9 values under Model where as in Sales there are only 4. I want a chart to count only 4 Models and not 9. What script should I use in the Expression field?

Thanks,

CD

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe create another field in the Sales table:

LOAD

     Model,

     Sales,

     autonumber(Model) as SalesModelNum

FROM Sales.xlsx;

Then do a count(distinct SalesModelNum) in your chart expressions.

View solution in original post

2 Replies
swuehl
MVP
MVP

Maybe create another field in the Sales table:

LOAD

     Model,

     Sales,

     autonumber(Model) as SalesModelNum

FROM Sales.xlsx;

Then do a count(distinct SalesModelNum) in your chart expressions.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Stefan's advice is spot on. You should ever count key fields as the results will be unpredictable.

-Rob