Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to create a field "Take Rate" that is the sum of the number of parts sold/sum of the number of vehicle sold. As of right now, the take rate field is the sum of the each part sold. Is there anyway to reference another table to use as the denominator or is there anyway to reference the max value in the take rate field I currently have?
I don't know how your model is constructed, but for example you can create an aggregate table for the sum of parts sold to create the Take Rate Field.
For example:
Take_Rate:
LOAD
ProductHierachyID,
MaterialID,
SUM(SoldParts) AS TakeRate
FROM Products
GROUP BY ProductHierachyID, MaterialID
;
May be this:
= Max(TOTAL Sum(number of parts sold) / (sum of the number of vehicle sold))
I'm trying to reference the max in the Take Rate field and use it as the denominator in another calculated dimension maybe? Is there anyway to do this? Or is there anyway to reference another table within a calculated dimension? I've looked into the aggr function and creating variables but haven't been able to figure this out.
Can you give me some sample data and your expected output? It will be easy to work on..
Hi Brett
The Take Rate field is calculated within the chart or in the load script?
As of now it is calculated within the chart
What would be the syntax to put it into the load script?
File is uploaded to original post
will look into it once i go home.
I don't know how your model is constructed, but for example you can create an aggregate table for the sum of parts sold to create the Take Rate Field.
For example:
Take_Rate:
LOAD
ProductHierachyID,
MaterialID,
SUM(SoldParts) AS TakeRate
FROM Products
GROUP BY ProductHierachyID, MaterialID
;