Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello -
I am attempting to do a YOY comparison in a chart; and with the research I have done I have not seen my exact situation.
I have a couple of variables; Inventory Type, Count of CCPInqKey, and Receivedhumanadata.
Ofcourse the Date portion is where I will be getting the Month and Year; the CCPInqKey is the count for the month, and the Inventory Type is the variable of what I want to count the YOY differences.
I've attempted to put together the below script from the other discussions I have found but with the below I get the error "Error in set modifier expression".
Im not sure if I am way off base with this; but have attached a sample of what I currently have.
sum({<Year(RECEIVEDHUMANADATE)={'2015'}>}count(INVENTORYTYPE)
I appreciate any assistance. Thanks!
You cannot use functions on the left hand side of a set modifier.
Sum({<Year(RECEIVEDHUMANADATE)={'2015'}>}count(INVENTORYTYPE)
Secondly, you cannot have one aggregation over another without using Aggr() function.
Sum({<Year(RECEIVEDHUMANADATE)={'2015'}>}count(INVENTORYTYPE)
In your case, try this: Instead you can create Year() in the script and use that in your set expression
LOAD INVENTORYTYPE,
RECEIVEDHUMANADATE,
Year(RECEIVEDHUMANADATE) as Year
FROM ....
and then may be this:
Count({<Year = {2015}>}INVENTORYTYPE)
You cannot use functions on the left hand side of a set modifier.
Sum({<Year(RECEIVEDHUMANADATE)={'2015'}>}count(INVENTORYTYPE)
Secondly, you cannot have one aggregation over another without using Aggr() function.
Sum({<Year(RECEIVEDHUMANADATE)={'2015'}>}count(INVENTORYTYPE)
In your case, try this: Instead you can create Year() in the script and use that in your set expression
LOAD INVENTORYTYPE,
RECEIVEDHUMANADATE,
Year(RECEIVEDHUMANADATE) as Year
FROM ....
and then may be this:
Count({<Year = {2015}>}INVENTORYTYPE)
You cannot use functions on the left side of the comparison , you will need to create the field in your script during load.
Year(RECEIVEDHUMANADATE) as received_year
Then use this feild in your set expression
count({<received_year={2015}>}INVENTORYTYPE)