Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

DAX - granular reallocation - revenue inbetween a period to days

$
0
0

I have a table Campaign_Report:

 

UID_CAMPAIGNStartFinishGross TotalDurationDaysGrossTotalDay
811402-12-2013 0:0008-12-2013 0:00$33,4217$4,774.43
1621702-12-2013 0:0006-12-2013 0:00$84,1225$16,824.40
2839210-12-2013 0:0015-12-2013 0:00$123,1236$20,520.50

 

note that the start and finish dates are inclusive. I'd like to proportion the revenur to each day so that I have a dynamic table that looks like this:

 

DateUID_CAMPAIGNGrossTotalDay
02-12-2013 0:008114$5,570.17
03-12-2013 0:008114$5,570.17
04-12-2013 0:008114$5,570.17
05-12-2013 0:008114$5,570.17
06-12-2013 0:008114$5,570.17
07-12-2013 0:008114$5,570.17
08-12-2013 0:008114$5,570.17
02-12-2013 0:0016217$21,030.50
03-12-2013 0:0016217$21,030.50
04-12-2013 0:0016217$21,030.50
05-12-2013 0:0016217$21,030.50
06-12-2013 0:0016217$21,030.50
10-12-2013 0:0028392$20,520.50
11-12-2013 0:0028392$20,520.50
12-12-2013 0:0028392$20,520.50
13-12-2013 0:0028392$20,520.50
14-12-2013 0:0028392$20,520.50
15-12-2013 0:0028392$20,520.50

 

So, the Date column only lists what is between each Campaign Start and Finish dates, the UID on each line and the individual daily breakdown of each. I've been trying to write a DAX formula to convert this, I have the dates in a table using 

 

Table = CALENDAR( minx(Campaign_Report,Campaign_Report[Start]), maxx(Campaign_Report,Campaign_Report[Finish] ))

But can anyone point me in the right direction as to DAX to split out each day total into the second table? 

 

 

 

 

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 213819

Trending Articles