- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to fix this IF condition?
Hello,
Please, how to fix the expression below?
if (UF = 'EX' and ProductMaterial = min(Color_id), sum (costmat))
ProductMaterial = min (Color_id) is not working.
I need to pick up just the first color number from each material and from each product.
Product
Color_id
ProductMaterial
Cost
UF
Thanks.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try this
if (UF = 'EX' and Color_id = Aggr(min(Color_id),ProductMaterial), sum (costmat))
or try this
try this
if (UF = 'EX' and Color_id = min(Color_id), sum (costmat))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try this
for min color id
aggr( min (Color_id),ProductMaterial)
or try this way
ONLY({<Color_id = {"=min (Color_id)"}>}ProductMaterial)
sum({<UF={'EX'},Color_id={"=MIN(Color_id)"}>}costmat)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try this
if (UF = 'EX' and Color_id = Aggr(min(Color_id),ProductMaterial), sum (costmat))
or try this
try this
if (UF = 'EX' and Color_id = min(Color_id), sum (costmat))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in script--
load
min(Color_id) as min
from table group by ProductMaterial;
the try your syntax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very much for everyone!... the expression below fits well:
if (UF = 'EX' and Color_id = Aggr(min(Color_id),ProductMaterial), sum (costmat))