Forum Discussion
eduardo
10 years agoAdvocate II
custom X-axis
Hello guys I have AdWords campaigns and I want compare the first day of the campaign 2015.1 with the first day of campaign 2016.1, the second day with to the second day and so on. Example Campai...
v-ljerr-msft
10 years agoMicrosoft Employee
According to your description, you want to compare same campaign last year(similar to YOY comparisons). Right?
The axis is from the data field in your dataset, you can’t custom axis unless you create a column with all your custom values and put it onto axis. In this scenario, you should still use complete date as X-axis and display two campaigns data together, you can use DATEADD and DATEDIFF function to dynamically get correct days back since two campaigns may have different start date and duration.
The formula below is for your reference.
CPA 2015.1 =
CALCULATE (
[CPA],
dados[Conta] = IdCampanha[Conta]
&& IdCampanha[2015.1_I] <> BLANK ()
&& dados[Dia] >= IdCampanha[2015.1_I]
&& dados[Dia] <= IdCampanha[2015.1_F]
)
CPA 2016.1 =
CALCULATE (
[CPA],
dados[Conta] = IdCampanha[Conta]
&& IdCampanha[2016.1_I] <> BLANK (),
DATEADD (
dados[Dia],
DATEDIFF (
MAX ( ALL ( IdCampanha[2015.1_I] ) ),
MAX ( ALL ( IdCampanha[2016.1_I] ) ),
DAY
),
DAY
)
)
Regards