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: 
dreweezy
Creator II
Creator II

missing a syntax in my expression?

Hi QlikSense gurus,

I've got a dashboard that focuses on one state with 4 different cities. I have a pivot table with an expression - 

sum({<CITY_NAME={'LA', 'SAN JOSE', 'HOLLYWOOD', 'ABBOT'}, dept_code = {"542"}>} TOTAL_SALES)

When I cross check this amount in my sql database it is way overstated. I then tried taking out the 'dept_code = 542' syntax and put a filter pane with dept_code and looks to be changing the numbers to match what is in my sql. Any reason why this is behaving this way? Is my syntax incorrect? Thank you.

4 Replies
RobertoObelar
Contributor
Contributor

Tente o seguinte,

 

sum ({<dept_code =P ({1<CITY_NAME = { 'LA', 'SAN JOSE', 'Hollywood', 'ABADE' }>}dept_code )>} TOTAL_SALES)

Acredito que irá funcionar.

 

Abç.

 

dreweezy
Creator II
Creator II
Author

Thank you - I have tried but no luck on this one.

Channa
Specialist III
Specialist III

sum({<CITY_NAME={'LA', 'SAN JOSE', 'HOLLYWOOD', 'ABBOT'}, dept_code = {'542'}>} TOTAL_SALES)

 

sum({<CITY_NAME={'LA', 'SAN JOSE', 'HOLLYWOOD', 'ABBOT'}, dept_code = {542}>} TOTAL_SALES)

 

this expression will bring cityname in (LA,SA Jose,hollywood,abbot ) and dept_code=542

chech if you looking for same

Channa
dreweezy
Creator II
Creator II
Author

Channa, thanks for your reply. I actually already had the exact expression but for some reason it just does not read in the dept code. It is using all dept codes.. I find it very interesting on why it is behaving this way. The only thing I can think of why this is happening is maybe my load script. The only off putting thing in my load script is doing a left join on a spreadsheet with different column headers than my connected data source (sql db).