Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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]) )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
113 | |
81 | |
45 | |
42 | |
27 |
User | Count |
---|---|
182 | |
83 | |
70 | |
48 | |
45 |