Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have seen a lot of information on date ranges in set analysis but not quite one that could answer my question.
I am trying to count SKUs for:
ProductType = {1000,2000}
AND
StartDate <= vDate, EndDate > vDate
OR
ProductType = {1000,2000}
AND
StartDate <= vDate, len(EndDate) = 0
I hope someone can help. I have seen If statements nested in Set Analysis and I really don't want to go down that path.
Thank you.
Hi,
Try like this
Count({<ProductType = {1000,2000}, StartDate={'<=$(=vDate)'}, EndDate ={'>$(=vDate)'}> +
<ProductType = {1000,2000}, StartDate={'<=$(=vDate)'}, EndDate -={'*'}>} SKU)
Note : The above expression will be shown as syntax error becuase of using -= in expression, but it works.
Hope this helps you.
Regards,
jagan.
You can use set operator + for OR:
{<set modifiers> + <different set modifiers>}
Hi,
Try like this
Count({<ProductType = {1000,2000}, StartDate={'<=$(=vDate)'}, EndDate ={'>$(=vDate)'}> +
<ProductType = {1000,2000}, StartDate={'<=$(=vDate)'}, EndDate -={'*'}>} SKU)
Note : The above expression will be shown as syntax error becuase of using -= in expression, but it works.
Hope this helps you.
Regards,
jagan.
Jagan and Michael, thank you both for jumping on this. I was seeing the + operator but was also wrapping the entire set in the same outer <>.
This is actually a great example of set analysis as it is doing many things and it's easily identifiable.
Thanks again.