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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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