Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello All,
I am new to qlikview still learning
I really need your help urgently.My sprint is ending tomorrow.
below is my sample data.
I want to only show the number with the max order_start_date.
so here i want to show the record with order_start_date as 3.11.2016.
number | name | PRODUCT_ID | PRODUCT_NAME | TIME_ARRIVAL | ORDER_START_DATE | time_rejected |
01 | john | 1 | a | 3.11.2016 14:37 | 16.6.2016 | 8.11.2016 12:32 |
01 | john | 1 | a | 3.11.2016 14:37 | 3.11.2016 | 8.11.2016 12:32 |
please let me know how i can do that in the straight table.
Appreciate your help.
Thanks & Regards,
jaya
Don't use ORDER_START_DATE as dimension in your straight table, but add =max(ORDER_START_DATE) as expression.
Thanks Gysbert.
I did that but it still doesnt work.
If multiple lines are shown then the combination of dimension values is unique. So, find out which dimension that is and remove it.
And make sure your date field actually contains date values and not strings of text that only look like dates. Use the date# function if necessary in the script to change a text value that looks like a date into a real date. The max function does not work on text, but only on numbers.
hello,
The date is in the right format,
But i was not able to understand the first part of your explanation.
sorry about this,
Please if you can tell me in more detail
Hi,
Did you tried
=FirstSortedValue(OrderDate,-Product)
Thanks Chanty.
I will try this now.
Hi Jaya, Qlik splits the records based on the different values of the dimensions, if a dimension has a lot of records but only 2 different values it will show only 2 values on chart.
I think this is what Gysbert saids in the first part of explanation, if you changed ORDER_START_DATE to an expression instead of dimension and it stills shows 2 rows it can be because any of the dimensions has more than one different value, it can be caused by different seconds or miliseconds in any of the dates, so it can be shown as the same value but internally has something different.
Try removing the TIME_ARRIVAL and time_rejected dimensions to check if it keeps only one row this way, if this happens then some of the dates are storing different values.
In this case you can use floor(fieldDate, 1/1440) in script to round the dates ignoring seconds and miliseconds (1440 is the number of minutes in a day)
Thanks Ruben.
Appreciate your reply.
I am using FirstSortedValue function. But what happens if the orderdate is same for both records and i want still one record to show?
Please reply as soon as possible for you.its a bit urgent.
Thanks
Hi Jaya, can you upload a sample that shows the issue and the expected result?