Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a population of data imported from a server that shows up on the dimensions tabs when I make a table or chart, I would like to perform some basic math operations on this data to calculate different heuristics that are used to baseline operations, however the only way I know to do this is to write an expression or calculated dimension. Since the expression and calculated dimensions are recalculated every time a new selection is made I regard this data as dynamic. I would like this data to be static and exist with the data that is imported from the server. Can anyone provide me a sample of a script that I could use as an example?
For Example:
Efficiency- efficiency is calculated by dividing the run time by the total time. I have this as an expression where one column is divided by another. Can I write a script that would perform this calculation for all the data that is loaded from the server and have it appear as an available field/group in the dimensions tab when I try and create a new table or chart?
You can do all kind of calculations in script unless you dont have anything based off selections i.e. listboxes etc.
Its always a best practise to do calculations in ETL.
Maybe something like
Load
[run time] ,
[total time] ,
[run time] / [total time] as [efficiency]
etc ...................
Could you post a sample of your script? We could suggest some calculations
Ok, attached is a very simple example of what I am trying to do, but the efficiency isn't being calculated. What's wrong with my syntax?
Try this:
Data:
LOAD
RunTime,
TotalTime,
RunTime / TotalTime as Eficiency INLINE [
RunTime, TotalTime
54, 100,
66, 110,
74, 95,
];