Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to create a field or a front end expression to filter rows in Status field.
The user should have 2 values to choose- Top, All.
When All is selected, show all products. If Top is selected show only products with status Yes.
Data:
LOAD * INLINE [
Product, Status
A, YES
A, YES
B, YES
C, NO
D, NO
];
I created this filter but it is not working
if(Status = 'YES' or Status = 'NO','All',
if(Status = 'YES','Top'))
Please help.
Try like this
Data:
LOAD * INLINE [
Product, Status
A, YES
A, YES
B, YES
C, NO
D, NO
];
LOAD * INLINE
[
Status,Filter
YES,TOP
YES,ALL
NO,ALL
];
Now use the filter column in the front end to get the desired results
Hi Suraj,
You need to create only top filter why you require all
If top is not selected means its by default all.
If(Status = 'YES','Top') as TOP.
Thanks,
Arvind patil
Please check if fits your needs
Try like this
Data:
LOAD * INLINE [
Product, Status
A, YES
A, YES
B, YES
C, NO
D, NO
];
LOAD * INLINE
[
Status,Filter
YES,TOP
YES,ALL
NO,ALL
];
Now use the filter column in the front end to get the desired results
Thanks everyone for various solutions.