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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create conditional dimension

Hi ,

I need to create a table box in Qlikview having two columns City ,Sales. The requirement is that only those City should be displayed where sales=0.

Ex:  City     Sales

         NY     0

         NJ      0

         BO     0

Please suggest any solutions

Labels (1)
3 Replies
tresB
Champion III
Champion III

instead of table box, try with straigth table. take the first dimension as calculated dimension and write the expression like: if(Sales=0, City) ....... calculated dimension

and for expression : =Sales ........expression tab..... assuming that your data is already aggregated.

alexandros17
Partner - Champion III
Partner - Champion III

Add the following expression

if(sum(sales)=0,'Zero',0)

and check the box "Exclude 0 values" in this way you set a value for o sales and set 0 to cities with sales (and exclude them)

Hope it helps

nirav_bhimani
Partner - Specialist
Partner - Specialist

Try this in script,

Cities:

Load  * Inline [

City,Sales

NY,0

NJ,0

BO,0

CO,1

];

CITY_MAP:

Load City , Sum(Sales) ,  If (Sum(Sales)=0, City ) as CityFlag

resident Cities

group by City;

Now use CityFlag & Sales in the dimension of table box.

In the presentation select Omit row to null check box.

Regards,

Nirav Bhimani