Here's what I've got so far (below). I've looked up this solution here and to be honest I understand only half of it.
The problem here is that when I'm trying to add all those dimensions (the bottom part of the solution) to be considered in this measure the calculation became super slow and not really usable.
I'm asking the community to help me optimize this script or maybe come up with the different solution to my problem.
Lots of thanks in advance!
Sessions Past Period = CALCULATE(SUM (ci_dashboard_v7[Sessions]), FILTER ( ALL ( ci_dashboard_v7 ), COUNTROWS (FILTER ( ci_dashboard_v7, EARLIER ( ci_dashboard_v7[Date] ) = DATEADD ( ci_dashboard_v7[Date],IF(DISTINCTCOUNT(ci_dashboard_v7[Date])<7,-7,DISTINCTCOUNT(ci_dashboard_v7[Date])), DAY ) && ci_dashboard_v7[WMC_partner_lvl1]=EARLIER(ci_dashboard_v7[WMC_partner_lvl1]) && ci_dashboard_v7[WMC_partner_lvl2]=EARLIER(ci_dashboard_v7[WMC_partner_lvl2]) && ci_dashboard_v7[Campaign]=EARLIER(ci_dashboard_v7[Campaign]) && ci_dashboard_v7[cd003]=EARLIER(ci_dashboard_v7[cd003]) && ci_dashboard_v7[cd135]=EARLIER(ci_dashboard_v7[cd135]) && ci_dashboard_v7[Channel]=EARLIER(ci_dashboard_v7[Channel]) && ci_dashboard_v7[Channel_simple]=EARLIER(ci_dashboard_v7[Channel_simple]) && ci_dashboard_v7[Date]=EARLIER(ci_dashboard_v7[Date]) && ci_dashboard_v7[Country]=EARLIER(ci_dashboard_v7[Country]) && ci_dashboard_v7[Domain]=EARLIER(ci_dashboard_v7[Domain]) && ci_dashboard_v7[Week]=EARLIER(ci_dashboard_v7[Week]) && ci_dashboard_v7[Week_day]=EARLIER(ci_dashboard_v7[Week_day]) && ci_dashboard_v7[Year_current]=EARLIER(ci_dashboard_v7[Year_current]) && ci_dashboard_v7[Week_current]=EARLIER(ci_dashboard_v7[Week_current]) && ci_dashboard_v7[Week_before_current]=EARLIER(ci_dashboard_v7[Week_before_current]) && ci_dashboard_v7[is_CRM]=EARLIER(ci_dashboard_v7[is_CRM]) && ci_dashboard_v7[WMC_tm]=EARLIER(ci_dashboard_v7[WMC_tm]) && ci_dashboard_v7[Platform]=EARLIER(ci_dashboard_v7[Platform]) && ci_dashboard_v7[Device]=EARLIER(ci_dashboard_v7[Device]) && ci_dashboard_v7[OS]=EARLIER(ci_dashboard_v7[OS]) && ci_dashboard_v7[WMC_type]=EARLIER(ci_dashboard_v7[WMC_type]) && ci_dashboard_v7[Source_Accengage_Pigeon]=EARLIER(ci_dashboard_v7[Source_Accengage_Pigeon]) && ci_dashboard_v7[WMC_tool]=EARLIER(ci_dashboard_v7[WMC_tool]) && ci_dashboard_v7[WMC_full]=EARLIER(ci_dashboard_v7[WMC_full]) && ci_dashboard_v7[Source]=EARLIER(ci_dashboard_v7[Source]) ))))