Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
bhattshubham
Frequent Visitor

Weekly and Monthly Aggreagations

Hi all,

 

I have the data of the following type for a large period of time.

 

PersonCallsConvertedDate
A10817-03-2020
B20617-03-2020
C302017-03-2020
A403124-03-2020
B302324-03-2020
C20724-03-2020
A10927-03-2020
B301127-03-2020
C20327-03-2020
A201301-04-2020
B30401-04-2020
C402801-04-2020
A10803-04-2020
B20603-04-2020
C302003-04-2020
A403107-04-2020
B302307-04-2020
C20707-04-2020
A10914-04-2020
B301114-04-2020
C20314-04-2020
A201317-04-2020
B30417-04-2020
C402817-04-2020

 

The conversion rate for the whole team is calculated at a week level and is calculated as,

Metric 1: Conversion Rate for each person for the week = SUM(Converted by that person)/SUM(Calls by that person)

Metric 2: Conversion Rate of the whole team for the week = AVERAGE(Conversion Rate for each person for the week)

 

When I select multiple weeks in the slicer, the number should be displayed as,

Metric 1: Conversion Rate for each person for selected weeks = AVERAGE(Metric 1 for that person for all weeks)

Metric 2: Conversion Rate of the whole team for selected weeks  = AVERAGE(Conversion Rate for each person for selected weeks)

 

I'm unable to think of easy ways to calculate this measure. Any help is hugely appreciated.

 

 

 

 

 

1 ACCEPTED SOLUTION
glissando
Resolver II
Resolver II

Assuming I understood your requirements correctly. Let me know if this worked for you.

 

Thanks

 

MEASURES

Total Calls = SUM(Conversions[Calls])
Total Conversions = SUM(Conversions[Converted])
Conversion Rate Person = DIVIDE([Total Conversions], [Total Calls])
Conversion Rate Team = DIVIDE(
SUMX(ALLSELECTED(Conversions), Conversions[Converted]) ,
SUMX(ALLSELECTED( Conversions), Conversions[Calls]))


DATE TABLE
Date =
VAR Dates =
CALENDAR (
DATE ( YEAR ( MIN ( 'Conversions'[Date] ) ), 1, 1 ),
DATE ( YEAR ( MAX ( 'Conversions'[Date] ) ), 12, 31 )
)
RETURN
ADDCOLUMNS (
Dates,
"Year", YEAR ( [Date] ),
"Quarter", FORMAT ( [Date], "q" ),
"Month", MONTH ( [Date] ),
"Month_Name", FORMAT ( [Date], "mmmm" ),
"Month_Short_Name", FORMAT ( [Date], "mmm" ),
"Year_Quarter", YEAR ( [Date] ) & "-Q"
& FORMAT ( [Date], "q" ),
"Year_Month", YEAR ( [Date] ) & "-"
& FORMAT ( [Date], "mm" )
)

 

WEEKENDING COLUMN

WeekEnding = [Date] + 7 - WEEKDAY([DATE],2)

 

Conversions.png

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@bhattshubham , Please find this file. This file deal with this week vs last week

https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0

glissando
Resolver II
Resolver II

Assuming I understood your requirements correctly. Let me know if this worked for you.

 

Thanks

 

MEASURES

Total Calls = SUM(Conversions[Calls])
Total Conversions = SUM(Conversions[Converted])
Conversion Rate Person = DIVIDE([Total Conversions], [Total Calls])
Conversion Rate Team = DIVIDE(
SUMX(ALLSELECTED(Conversions), Conversions[Converted]) ,
SUMX(ALLSELECTED( Conversions), Conversions[Calls]))


DATE TABLE
Date =
VAR Dates =
CALENDAR (
DATE ( YEAR ( MIN ( 'Conversions'[Date] ) ), 1, 1 ),
DATE ( YEAR ( MAX ( 'Conversions'[Date] ) ), 12, 31 )
)
RETURN
ADDCOLUMNS (
Dates,
"Year", YEAR ( [Date] ),
"Quarter", FORMAT ( [Date], "q" ),
"Month", MONTH ( [Date] ),
"Month_Name", FORMAT ( [Date], "mmmm" ),
"Month_Short_Name", FORMAT ( [Date], "mmm" ),
"Year_Quarter", YEAR ( [Date] ) & "-Q"
& FORMAT ( [Date], "q" ),
"Year_Month", YEAR ( [Date] ) & "-"
& FORMAT ( [Date], "mm" )
)

 

WEEKENDING COLUMN

WeekEnding = [Date] + 7 - WEEKDAY([DATE],2)

 

Conversions.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.