v_ganchev
Contributor II
2018-10-18
04:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Last record for dimension with multiple equals values
Table No. | Document Type | Article | Needed Quantity | Variant Code | Version No. |
---|---|---|---|---|---|
36 | 1 | Article1 | 500 | VariantCode1 | 0 |
36 | 1 | Article1 | 0 | VariantCode1 | 0 |
5107 | 4 | Article1 | 1000 | VariantCode1 | 2 |
5107 | 4 | Article1 | 1000 | VariantCode1 | 2 |
Hello.
This is example of my table in database.
How it's possible to get the last record for dimension Article column?
The result must be:
Article | Need Quantity | VariantCode |
---|---|---|
Article1 | 1000 | VariantCode1 |
My idea was to use:
set NeedQty = FirstSortedValue('Need Quantity' - 'Version No_');
But when there is the equal Version No. it's showing null.
Thanks!
675 Views
1 Solution
Accepted Solutions
2018-11-18
03:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try =FirstSortedValue( aggr(max([Needed Quantity]),Article,[Version No.]), -aggr([Version No.],[Version No.],Article))
See attached qvw.
talk is cheap, supply exceeds demand
587 Views
1 Reply
2018-11-18
03:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try =FirstSortedValue( aggr(max([Needed Quantity]),Article,[Version No.]), -aggr([Version No.],[Version No.],Article))
See attached qvw.
talk is cheap, supply exceeds demand
588 Views