Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
khadar
Contributor III
Contributor III

Classification in qliksense

Hi Team,

 I need a small help on my below concern. I have a column called Items which is holding  all types of items in it.

 based on type of product i derived the categories and respective cost of it.  for last month I do not have any items related to vehicles  as result of this whole vehicle row got disappeared from category list  in front end.

in this case I want show vehicle row and total cost will be 0 as there is not data for last month for vehicle category .

 

can some please help me on this ?

 

Items Cost categoty  Total cost
Televison  70000 Electronic applicances  140000
radio 5000
Home theatre  5000
Refrigerator  30000
washing machine  30000
Running shoes  2000 Foot wear 5500
school shoes 2000
GyM shoes  1500
car 1000000 Vehicales 3100000
bus 2000000
Motorcycle  100000
Labels (1)
2 Solutions

Accepted Solutions
Andrei_Cusnir
Specialist
Specialist

Hello,

 

Perhaps you can share some additional details of your use case scenario? For example:

  • What you have already tried
  • A screenshot of the table that you get
  • The expression that you used to calculate the sum
  • etc.

 

You have specified "for last month I do not have any items related to vehicles", however I am not sure that I have understood this statement 100%, because on the demo data that you shared there are not dates associated with the items or categories. For example I have used the demo data that you have shown:

load * inline [
   Items,Cost,categoty
   Televison ,70000,Electronic applicances
   radio,5000,Electronic applicances
   Home theatre ,5000,Electronic applicances
   Refrigerator ,30000,Electronic applicances
   washing machine ,30000,Electronic applicances
   Running shoes ,2000,Foot wear
   school shoes,2000,Foot wear
   GyM shoes ,1500,Foot wear
   ,,Vehicales
];

 

And for the "Vehicales" I have removed all the items. (This is probably why I have different outcome that you do). The table that I get is:

On my side though, the Category "Vehicales" still exists and it shows 0. 

 

I would recommend you to share an EXCEL file with demo data  and then also share the sample app. It will allow us to reproduce the issue on our side and see if there is an workaround for your use case scenario.

 

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

Qbo
Contributor III
Contributor III

You need to create an items table, so that categoty always exists, if you just APPLYMAP() it obviously won't be there. So something like this will work:

Items:
Load * Inline[
Items, categoty 
Televison , Electronic applicances 
radio, Electronic applicances 
Home theatre , Electronic applicances 
Refrigerator , Electronic applicances 
washing machine , Electronic applicances 
Running shoes , Foot wear
school shoes, Foot wear
GyM shoes , Foot wear
car, Vehicales
bus, Vehicales
Motorcycle , Vehicales
];

Values:
NoConcatenate
LOAD * Inline[
Items, Cost
Televison , 70000
radio, 5000
Home theatre , 5000
Refrigerator , 30000
washing machine , 30000
Running shoes , 2000
school shoes, 2000
GyM shoes , 1500
car, 
bus, 
Motorcycle , 
];

View solution in original post

2 Replies
Andrei_Cusnir
Specialist
Specialist

Hello,

 

Perhaps you can share some additional details of your use case scenario? For example:

  • What you have already tried
  • A screenshot of the table that you get
  • The expression that you used to calculate the sum
  • etc.

 

You have specified "for last month I do not have any items related to vehicles", however I am not sure that I have understood this statement 100%, because on the demo data that you shared there are not dates associated with the items or categories. For example I have used the demo data that you have shown:

load * inline [
   Items,Cost,categoty
   Televison ,70000,Electronic applicances
   radio,5000,Electronic applicances
   Home theatre ,5000,Electronic applicances
   Refrigerator ,30000,Electronic applicances
   washing machine ,30000,Electronic applicances
   Running shoes ,2000,Foot wear
   school shoes,2000,Foot wear
   GyM shoes ,1500,Foot wear
   ,,Vehicales
];

 

And for the "Vehicales" I have removed all the items. (This is probably why I have different outcome that you do). The table that I get is:

On my side though, the Category "Vehicales" still exists and it shows 0. 

 

I would recommend you to share an EXCEL file with demo data  and then also share the sample app. It will allow us to reproduce the issue on our side and see if there is an workaround for your use case scenario.

 

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
Qbo
Contributor III
Contributor III

You need to create an items table, so that categoty always exists, if you just APPLYMAP() it obviously won't be there. So something like this will work:

Items:
Load * Inline[
Items, categoty 
Televison , Electronic applicances 
radio, Electronic applicances 
Home theatre , Electronic applicances 
Refrigerator , Electronic applicances 
washing machine , Electronic applicances 
Running shoes , Foot wear
school shoes, Foot wear
GyM shoes , Foot wear
car, Vehicales
bus, Vehicales
Motorcycle , Vehicales
];

Values:
NoConcatenate
LOAD * Inline[
Items, Cost
Televison , 70000
radio, 5000
Home theatre , 5000
Refrigerator , 30000
washing machine , 30000
Running shoes , 2000
school shoes, 2000
GyM shoes , 1500
car, 
bus, 
Motorcycle , 
];