Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
How do I calculate a metric which is the following for the last month.
What I have does not work:
this table 'time to conversion is connected to 'dim_date[Date]
% one session conversions =
CALCULATE(
COUNT('time_to conversion'[user_pseudo_id]),
'time_to conversion'[Session To Conversion Band] = "1"
)
/ DISTINCTCOUNT('time_to conversion'[user_pseudo_id])
Solved! Go to Solution.
Hello, @Anonymous ,
it depends on how you define last month but, if you have a calendar with some flag or just have Slicer.
you can do something like this.
% one session conversions =
CALCULATE(
CALCULATE(
COUNT('time_to conversion'[user_pseudo_id]),
'time_to conversion'[Session To Conversion Band] = "1"
)
/ DISTINCTCOUNT('time_to conversion'[user_pseudo_id]),
'calendar'[YearMonth]=MAX('calendar'[YearMonth])
)
alternatively using TOTALMTD
% one session conversions =
TOTALMTD(CALCULATE(
COUNT('time_to conversion'[user_pseudo_id]),
'time_to conversion'[Session To Conversion Band] = "1"
)
/ DISTINCTCOUNT('time_to conversion'[user_pseudo_id]), 'calendar'[Date])or datesmtd
% one session conversions =
CALCULATE(
CALCULATE(
COUNT('time_to conversion'[user_pseudo_id]),
'time_to conversion'[Session To Conversion Band] = "1"
)
/ DISTINCTCOUNT('time_to conversion'[user_pseudo_id]),
DATESMTD('calendar'[Date]) )
Hello, @Anonymous ,
it depends on how you define last month but, if you have a calendar with some flag or just have Slicer.
you can do something like this.
% one session conversions =
CALCULATE(
CALCULATE(
COUNT('time_to conversion'[user_pseudo_id]),
'time_to conversion'[Session To Conversion Band] = "1"
)
/ DISTINCTCOUNT('time_to conversion'[user_pseudo_id]),
'calendar'[YearMonth]=MAX('calendar'[YearMonth])
)
alternatively using TOTALMTD
% one session conversions =
TOTALMTD(CALCULATE(
COUNT('time_to conversion'[user_pseudo_id]),
'time_to conversion'[Session To Conversion Band] = "1"
)
/ DISTINCTCOUNT('time_to conversion'[user_pseudo_id]), 'calendar'[Date])or datesmtd
% one session conversions =
CALCULATE(
CALCULATE(
COUNT('time_to conversion'[user_pseudo_id]),
'time_to conversion'[Session To Conversion Band] = "1"
)
/ DISTINCTCOUNT('time_to conversion'[user_pseudo_id]),
DATESMTD('calendar'[Date]) )
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.