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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Set analysis with If statement

I have below data set

CountryCitySales
USANweYork2000
USA520
UKLondon200
UK150
AUSSydney8000
AUSperth560
USAChicago

580

I want to get

   

CountryCity Salesempty City Sales
USA2580520
UK200150
AUS8560

-

From Above data set. I use Country as dimension. and use separate set expressions for others. but i don't know how to get both the fields with and without country in single raw in pivot table

Thanks

11 Replies
sasiparupudi1
Master III
Master III

If you are using city also as a dimension then you could use it as a calculated one as follows

=if(len(Trim(City))>0,City,'No City')

then the single expression sum(Sales)  will show all values in single column.

dimensions Countrry,calculated dimension =if(len(Trim(City))>0,City,'No City')

expression  Sum(sales)

hth

Sasi

trdandamudi
Master II
Master II

Might be version difference ? The app I created was in version 11.2