Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a straight table where I want to have the sum of sales for a year in one column and in the next column I want just the month of Dec sales.
Consider a table like this:
Part Month Year Sales
In the straight table my Dimension is Part. Then I have a column Annual Sales where I have an expression like sum(<{Year={'2016'}>}Sales). When I try to isolate one month via set analysis it will not work. have tried sum(<{Year={'2016'},Month={'Dec'}>}Sales) with no luck. Any suggestions?
Ok so I figured it out but not exactly sure why it works. In the set analysis I used Month={"*Dec*"}. Not sure why simply 'Dec' itself does not work. If anybody knows I would be interested to understand why. Thanks
Hello,
Try It
SUM({
$<Year = {2016}, Month = {'Dec'}>
}
Sales) !
If you copied this directly from your QVW, your syntax for the beginning of the set analysis is off.
You have:
sum(<{Year={'2016'}>}Sales)
Should be:
sum({<Year={'2016'}>}Sales)
sorry, you are correct - and I did not copy it, just typed it wrong
So I see how this works in your example but for some reason its not working in my data set. I do have other identifiers in the data that I'm isolating as well besides Month. I just gave that as an example as I thought the answer would work regardless. So if you had more than one item in your set analysis that is attempting to isolate the month of Dec and say (for sake of example) currency. And assume the database has sales in 2 different currencies for each month. So I want to isolate currency USD, Year 2016 and month Dec. Not sure why that would matter but there must be something to it.
Ok so I figured it out but not exactly sure why it works. In the set analysis I used Month={"*Dec*"}. Not sure why simply 'Dec' itself does not work. If anybody knows I would be interested to understand why. Thanks