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
Lor_Bla123
New Member

Average per region per month

Hi there

 

I'm relatively new to the world of Power BI so this may be a basic query but have been unable to find a solution. I have 2 data tables for the report I am producing - one is a raw data set (65k rows), with each row representing a task with a unique ID.

Task ID | Date created | Site | Region

1234 | 15/10/19 | SiteA | RegionA

3214 | 15/10/19 | SiteB | RegionA

3215 | 14/10/19 | SiteB | RegionA

1785 | 17/08/19 | SiteC | RegionB

8525 | 01/08/19 | SiteD | RegionB

The second table is a reference table showing 1500 sites along with their allocated region (33 regions in total).

Site | Region

SiteA | A

SiteB | A

SiteC | B

SiteD | B

SiteE | A

 

I want to produce a table/graph which shows average task volume per region per month - normalised for the number of sites in that region. In Excel I'd create use a pivot table to sum per region per month and then divide by the number of sites in the region but struggling to get this to work in BI. I've tried various Quick Measures and also tried creating a third summary table which just has Region name and count of site but still not getting anywhere. 

Everything I try either seems to give me the total volume per region per month or the average based on the 1500 sites and not split by region.

 

Any help would be much appreciated..

 

Thanks 

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Lor_Bla123 ,

 

We can create measure using following formula to meet your requirement:

 

Average =
DIVIDE (
    COUNT ( 'TableA'[Task ID] ),
    CALCULATE (
        COUNTROWS ( 'TableB' ),
        "Region"
            & TableB[Region] IN FILTERS ( 'TableA'[Region] )
    ),
    0
)

12.PNG


BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Lor_Bla123 ,


How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @Lor_Bla123 ,

 

We can create measure using following formula to meet your requirement:

 

Average =
DIVIDE (
    COUNT ( 'TableA'[Task ID] ),
    CALCULATE (
        COUNTROWS ( 'TableB' ),
        "Region"
            & TableB[Region] IN FILTERS ( 'TableA'[Region] )
    ),
    0
)

12.PNG


BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.