Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I got an issue with regard to the use of flags to filter the data.
Assume I got a table as mentioned below,
Prod_ID | Prod_Name | Date | Quantity | Selling Price | Country1 |
P100 | A | 10/02/2018 | 20 | 10 | NZ |
P101 | B | 15/03/2018 | 15 | 15 | AUS |
P102 | C | 14/01/2018 | 28 | 5 | UK |
P103 | D | 20/03/2018 | 30 | 10 | AUS |
P103 | D | 10/01/2018 | 14 | 15 | NZ |
P104 | E | 25/02/2018 | 28 | 20 | DEN |
P102 | C | 10/04/2018 | 30 | 10 | NZ |
I am using a flag (named Flag1) to filter the data where the Country is "NZ' ,the quantity is greater than 15 and the Selling Price > 15.
Thus the result should be something like below,
Prod_ID | Prod_Name | Date | Quantity | Selling Price | Country1 |
P100 | A | 10/02/2018 | 20 | 10 | NZ |
P102 | C | 10/04/2018 | 30 | 10 | NZ |
The sample statement to set the flag would be,
"If(Country = 'NZ' and Quantity >15 and "Selling Price" >10,1,0) as Flag1"
Once I have loaded the data to Qlik Sense, I need to visualize the data (May be in a Table format) after application of the filter.
Without applying the filter (may be as an expression), it will display the entire 7 data records.
Could anyone please explain me how to accomplish the above task cos I am posting this discussion for the second time.
Note
Kindly explain where I need to apply the expressions to filter the data and visualize only the output results in Qlik Sense after the "Data Load" process.
Awaiting for you valuable reply.
Regards
Andy
Hi,
if you're creating the Filter Flag 1, just use the Value 1 in a listbox for example and all the table will be filtered as expected.
what is the issue here ?
Hi Youssef,
I could use the below code to load the original data in to qlik sense,
Table:
LOAD
Prod_ID,
Prod_Name,
Date,
Quantity,
Selling Price,
Country1,
If(Country = 'NZ' and Quantity >15 and "Selling Price" >10,1,0) as Flag1
FROM (XXXX)
Assume I load the data in to qlik sense and go to "App Overview" to create a table and visualize the data, it will show the entire data set as below,
Requirement?
I want to visualize the data which fulfills the requirement of the Flag.
Note
I have heard that there is an option to create an expression for fields so that it will only presents the filtered data. ( According to the scenario it should be something like,
I know it is bit tricky to explain, but actually may be a simple thing I am missing here.
Hope you understood the issue now.
Look forward to hearing from you.
Regards,
Andy
Hi
Actually the final output shuld be something like below,
I will not have the field name "Flag" thus, cannot use the select option from the "Flag" field.
Hope it is clear for you.
Regards,
Andy
Try this.
Add a measure like below (instead of country dimension) so that you will see only records with matching criteria
=only({<flag={1}>}Country1)
However, there are no records matching with your condition.
hi,
try to take total data with using resident load from table and give the condition as where flag =1
Hi Rangam,
Thanks for your reply.
I can add other fields as necessary as a measure fulfilling a flag requirement right? Assuming I got more than a single flag.
Thanks,
Regards,
Andy
Hi Praveen,
Yes I could use the WHERE clause. But the issue is it removes the data which does not fulfill the WHERE condition.
My requirement was to view the resulted data while not loosing the not matching data rows.
Thanks.
Regards,
Andy