Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey all,
Looking for some help in comparing the last 30 days to the previous 30 day period.
I've got an export of Google Search Console data which is loaded into one table.
I've summarised the date range 1/3/2022 - 30/3/2022 (last 30 days) into a table.
To highlight the DAX used to summarize the clicks, I used.
last 30 day clicks =
CALCULATE (
SUM ( mytable[clicks] ),
DATESINPERIOD ( date_lookup[date], MAX ( date_lookup[date] ), -30, DAY )
)
I then went through the same process to summerize total impressions, av pos and keyword count.
What I'm struggling with is how to write the DAX which takes the previous 30 day period (30/1/2022 - 28/2/2022).
Hope this makes sense as to what it is I'm trying to achieve.
Thanks,
Solved! Go to Solution.
@stuhoughton , Last 30 before 30
last 30 day before 30 clicks =
CALCULATE (
SUM ( mytable[clicks] ),
DATESINPERIOD ( date_lookup[date], MAX ( date_lookup[date] ) -30 , -30, DAY )
)
make sure date_lookup is marked as date table
Hey @amitchandak thanks for the super quick response.
Yeah that works perfectly. I'm still learning the basics really appreicate your help. 😊
@stuhoughton , Last 30 before 30
last 30 day before 30 clicks =
CALCULATE (
SUM ( mytable[clicks] ),
DATESINPERIOD ( date_lookup[date], MAX ( date_lookup[date] ) -30 , -30, DAY )
)
make sure date_lookup is marked as date table
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
98 | |
81 | |
65 | |
62 |
User | Count |
---|---|
147 | |
116 | |
104 | |
88 | |
65 |