Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to use the following statement =if(Sum ([Bill Hrs]) / Sum ([Std Hrs]) <= vMax, [Equipment Desc]) to calculate a dimension, however I am getting the message '// Error in calculated dimension" . Are you not allowed to do a sum within a calculated dimension or is my format wrong. vMax is a percentage from a slider. Thanks
You aren't allowed to do a sum() or other aggregations in a calculated dimension without using the aggr() function. In this case, I assume you want the sums to be in the context of the given piece of equipment? Then I would think you'd do this:
if(aggr(sum([Bill Hrs]),[Equipment Desc])
/aggr(sum( [Std Hrs]),[Equipment Desc]) <= $(vMax),[Equipment Desc])
I'm actually not sure if I have the aggr() in the right place, but you need an aggr().
If vMax is a variable you added, try $(vMax) instead.
All ready tried that one....same results.
Thanks
Could it be there are multiple selections possible for field [Equipment Desc]?
Try a Min, Max, Count, ... for that field.
I tried several versions of your instruction in the "What's New in QV9" application and they all worked. So I am just guessing atm 😉
We are on 8.5,
There can be multiple equipment descriptions
You aren't allowed to do a sum() or other aggregations in a calculated dimension without using the aggr() function. In this case, I assume you want the sums to be in the context of the given piece of equipment? Then I would think you'd do this:
if(aggr(sum([Bill Hrs]),[Equipment Desc])
/aggr(sum( [Std Hrs]),[Equipment Desc]) <= $(vMax),[Equipment Desc])
I'm actually not sure if I have the aggr() in the right place, but you need an aggr().
ahum ... I should have realized that, just studied the aggr() function yesterday.
Look in the help for an explanation on aggr(). It will really help in realizing why and how when using aggr()
John,
You are a officer and a gentleman. Thanks for all your help that is exactly what needed done. Where do I send the six-pack.
Thom
Mark,
Thanks for your help. See if John wants to share the six-pack.
Thom