Sandra welcome to the forums! You really need to give us a few more details. But if you put your date field on the row or column shelf set to MONTH and then create a calculation like this:
And you this on the row or column shelf, you should get a bar chart showing your cost per impression aggregated to month. This of course depends on how your data is laid out. Is it coming from the same data source or are costs coming from a different data source? What's the linking field for those data sources.
More info, and you'll get more/better help.
thanks for replying
do you know how I can attached an excel doc? it shows what I need to do
will try what you wrote and let you know thanks
click on top right corner and enable advance editor, and then on the bottom right corner you could click on Attach.
so I have a Total cost of the month
and I have my impressions split by day
I have done a factor for each day : impresion of the day/total impression of the month
I want to use this daily factor to split my spend by day
let me know if not clear...
PRO RATA EXAMPLE.xlsx 11.4 KB
Sandra, it sounds like your data is coming from two different sources. One for the impressions, clicks, etc. aggregated daily and another one that holds your spend or costs aggregated by month. I assumed this to be the case in the attached workbook. The only tricky bit (apart from table calculations in general) is that you need to create this calculation in each data source:
DATENAME('month', [Date] )
And use it as your linking field, NOT the date field. In the secondary data source note the broken (grey) link and the functioning (orange) link, and which is which. After that it is just a matter of setting your compute using fields correctly in the table calculations.
If you have more questions, just ask.
Pro Rata -SW.twbx.zip 45.9 KB
Thanks a lot
I think the best then is to do this in Excel not to mess up Tableau too much
I keep this though it might be useful.