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
PrizzC15
Frequent Visitor

Count DOW and divide actual filter DOW

Hi 

I need help as below question:

PrizzC15_0-1670922100076.png

 

TIA

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

Hi @PrizzC15 ,

 

If the average aggregation could't work, please try:

 

Sales A =
var _a = SUM('Table'[Person A])
var _b = COUNT('Table'[DOW])
return DIVIDE(_a,_b)

Sales B =
var _a = SUM('Table'[Person A])
var _b = COUNT('Table'[DOW])
return DIVIDE(_a,_b)

 

 

Best Regards,

Jianbo 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

7 REPLIES 7
v-jianboli-msft
Community Support
Community Support

Hi @PrizzC15 ,

 

If the average aggregation could't work, please try:

 

Sales A =
var _a = SUM('Table'[Person A])
var _b = COUNT('Table'[DOW])
return DIVIDE(_a,_b)

Sales B =
var _a = SUM('Table'[Person A])
var _b = COUNT('Table'[DOW])
return DIVIDE(_a,_b)

 

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-jianboli-msft
Community Support
Community Support

Hi @PrizzC15 ,

 

Is that not the result you want? Or have I misunderstood?

vjianbolimsft_0-1671170630645.png

If I misunderstood, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-jianboli-msft
Community Support
Community Support

Hi @PrizzC15 ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1671001849164.png

You can achieve this by using the average aggregation directly:

vjianbolimsft_1-1671002219677.png

Final output:

vjianbolimsft_2-1671002256752.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, 

I trying to upload pbix but not able.

Herewith the details:

PrizzC15_0-1671176527882.png

 

Hope you can helps with this.

 

My result is difference:

PrizzC15_0-1671097255686.png

Based on Oct number DOW 

Mon, Sat & Sun divide 5

Tue, Wed, Thu, Fri divide 4

 

For example: Total of Sales for Person A in Oct 2022 by DOW

Fri 1004 / 4 = 251

Mon 943 / 5 = 188.6

 

Because each month it's difference DOW count

eg. in Jan 2022 (Mon, Sat & Sun x 5 days), in Mar 2022 (Tue, Wed & Thu x 5 days)...etc..

 

v-jianboli-msft
Community Support
Community Support

Hi @PrizzC15 

 

Sorry for that the picture you provided is not very clear. Can you share a clearer picture or share more details to help us clarify your scenario?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your reply. I had replaced the picture. Feel free to clarify with me if any doubt of question.

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.