Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
PFA,
Here calculating Actual vs Demand
AD %age= Demand/Actual..
--Paul
Total sum it Should be 100%
Try This.... and it cant be 100% as Actual and Demand is not equal.
AD % age
Alt(SUM(Demand)/SUM(Actual),0)
You should always use aggregations in expressions, so I would expect the expression to read like:
sum(Demand)/sum(Actual)
The only time you wouldn't do this if if you were referencing prior columns, eg.:
[Actual Demand] / [Monthly Coverage]
In this case the aggregations are done in the other columns.
Not sure what you mean by the total should be 100% - as each row is independent of the others. To get the contribution of the demand to the whole you could add an expression like this:
sum(Demand) / sum(TOTAL Demand)
This will divide the value on each row by the total across all rows.
Hope that helps.
Steve
Hi Paul,
You are saying Demand/Actual.
Should it be SUM(Demand)/SUM(Actual)
regards
Alan
Hello Steve,
sum(Demand) / sum(TOTAL Demand)
it's show perfect 100% of the data..
why are You using (TOTAL) Function here...
Hi,
If we are using Total Keyword then It will consider Entire set for that Field & show the result.
Formula should be
SUM(Demand)/SUM(Actual)
Regards,
Nirav Bhimani
Hi Paul,
The TOTAL keyword gives the total for that sum (or any aggregation) regardless of the dimension. This means you are dividing the Demand for one row by the total demand for all rows (and on the total row it is the Total divided by itself - i.e. 1).
If you create a new expression with just sum(TOTAL Demand) in it you will see it has the same value on every row.
Hope that helps explain.
Cheers,
Steve