Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I'm new to Qlikview.
I have a situation like i got 100 million product details.
where productID will be unique but when ever the details changes we will have a new productdetailID.
I have to pick a latest one.
& My table have only ProductID & ProductDetailID fields.
when i'm using MAX function & grouping by ProductID.
I'm getting an invalid expression in script.
I tried MAXNUM which didn't worked.
Can anyone help me with this issue please.
thanks a lot to you all.
HI
Try with FirstSortedValue() function
or
group by ProductID desc; // can able to use group by createdon desc;
hope it helps
Hi Mayil Vahanan,
Tried using firstsortedvalue(ProductdetailID,ProductID)
which gave me same error as
" Invalid Expression ".
tried max(productdetailID)
group by productID.
which gave me same error stating.
"Invalid Expression "
Hi ,
If ProductdetailID is a text.
Tried using MaxString() function.
As follows:
LOAD ProductID,
MaxString(ProductdetailID) as ProductdetailID
FROM
maxProduct.xlsx(ooxml, embedded labels, table is Sheet1)
group by ProductID;
hope it helps.
Hi,
Try like this in script
Products:
LOAD
*,
WHERE IsLatestProduct = 1;
LOAD
ProductID,
ProductDetailID,
If(ProductID <> Previous(ProductID), 1, 0) AS IsLatestProduct
FROM DataSource
ORDER BY ProductID, ProductDetailID DESC;
Hope this helps you.
Regards,
Jagan.