Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
miranrai
Contributor III
Contributor III

Set analysis expression issue

Hi, I have tow tables one is master table which has dimensions such as time_date (date) field ,customer , sales status , watchID and sales data and other  table in which i have separately calculated previous month and previous quarter value of a sales status columns are like, time_date, previous_month_sales_status, previous_qtr_sales_status etc and joined these two tables on time_date+Customer key. Now in my straight table chart , I am using set analysis to calculate current Max month and previous month using variables and using those variables in expression but i am getting 2 rows in my chart i am not sure whats going wrong.

Fore current month its showing previous month sales value as 0 and other way too. Any help?

Thank you.

CustomerCurrent Sales StatusPrev Month Sales StPrev QTR Sales StPrev To Prev Qtr Sales StatusCurrent Month SalesPrevious Month Sales
ABCXXYYFDGG0400
ABCXXYYFDHU1000
6 Replies
SunilChauhan
Champion II
Champion II

remove prev to prev quarter sales status. it is due to this.

Sunil Chauhan
tyagishaila
Specialist
Specialist

Because you have two different status (Prev To Prev Qtr Sales Status) for both

Current Month Sales and Previous Month Sales

miranrai
Contributor III
Contributor III
Author

Yes, its because I am having previous month/QTR/Yr status in my straight table. But I can't remove it as client want to see these status in same chart. So can anything be done on expression level to get the result without removing previous thing?? thanks for your reply.

SunilChauhan
Champion II
Champion II

i thing nothing wrong with it. it will show 2 rows Prev To Prev Qtr Sales Status

one for CG and one for HU.

this is how  Qlikview works

Sunil Chauhan
tyagishaila
Specialist
Specialist

If you want to have  column Prev to Prev Qtr Sales.

thn your table is okay.

Or let us know, what output you exactly want ?

miranrai
Contributor III
Contributor III
Author

Ok.. Let me explain you my issue in detail. In this table 2nd record for which Prev To Prev Qtr Sales Status ='HU' is the correct record. Prev To Prev Qtr Sales Status ='GG' is the wrong one for previous to previous Qtr this GG value is coming from Previous Month (I don't know why so .. I guess as i have used Previous Month in set analysis that's why this record is popping up.). whats i want is to remove this GG record which i achieved by adding one more condition into my current month & previous month expression condition timedate from sales status = current month. But for previous month its still showing 0 value. I am attaching a sample qvw for reference.

stomerCurrent Sales StatusPrev Month Sales StPrev QTR Sales StPrev To Prev Qtr Sales StatusCurrent Month SalesPrevious Month Sales
ABCXXYYFDGG0400
ABCXXYYFDHU1000

my desire result set is

CustomerCurrent Sales StatusPrev Month Sales StatusPrev QTR Sales StPrev To Prev Qtr Sales StCurr Month SalesPrevious Mon Sales
ABCXXYYFDHU100400