March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
Please help.
I'm trying to add up the number of sessions during a few time periods, I'll give the dates ranges in relation to today if the date was Monday 8th January 2024.
Name | Dates | Formulas |
Last week | 1/01/2024 to 7/01/2024 | Date_lpm_lw_so = MAX(Landingpagemarketing[End_of_week])-6 Date_lpm_lw_eo = MAX(Landingpagemarketing[End_of_week]) |
2 weeks | 25/12/23 to 31/12/23 | Date_lpm_2w_so = MAX(Landingpagemarketing[Start of Week])-7 Date_lpm_2w_eo = MAX(Landingpagemarketing[End_of_week])-7 |
Previous 8 weeks | 6/11/23 to 31/12/23 | Date_lpm_8w_so = MAX(Landingpagemarketing[End_of_week])-62 Date_lpm_8w_eo = MAX(Landingpagemarketing[End_of_week])-7 |
Within the table landingpagemarketing, I have the following measure which counts correctly in a card but brings in other pages from other weeks when in a graph:
Speaking internally, I have to move the measures onto my date table (dim_date) which I have done but the measures aren't populating the graph at all now. I've done a week_Start and a week_end for each date in dim_date as well as last week, 2week and 8 week start and end dates. I've tried using datedifference but it doesn't work either.
There is a week index that I'm trying to use but the sql needs to be updated as it isn't aligned with the week numbers. I've also tried going backwards using the isoweeknum but we have just started a new year and I can't find an solution for that either.
Other formulas I've used:
Solved! Go to Solution.
I managed to find the answer here: DAX Tables – Calendar and Time – Ville Gullstrands blogg (villezekeviking.com)
Using the following measures for last week, the week before & previous 8 weeks:
I managed to find the answer here: DAX Tables – Calendar and Time – Ville Gullstrands blogg (villezekeviking.com)
Using the following measures for last week, the week before & previous 8 weeks:
HI @Anonymous,
Perhaps you can take a look at the following blog about dynamic segments if helps:
Dynamic segmentation – DAX Patterns
Regards,
Xiaoxin Sheng
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
90 | |
86 | |
76 | |
49 |
User | Count |
---|---|
167 | |
149 | |
99 | |
73 | |
57 |