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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
pvtrinh89
Frequent Visitor

Devide by one time in a multiple values

Hi,

 days_in_month.png

 

Hi,
I have a time table with days_in_month field to count everyday in a month into a column and the value for this field is the same for each row belongs to a month.
Now i want to create a new measure by divide Total Sales / days_in_month but just only one time instead of dividing 31 times for Mar.

Assuming Total Sales for Mar = 1M$, now i want to create this measure(named avgSales) = Total Sales/31

 

Could anyone help me? thanks in advanced

 

Best regards,
J.

 

1 ACCEPTED SOLUTION
v-haibl-msft
Microsoft Employee
Microsoft Employee

@pvtrinh89

 

You only need to make sure the expression for days is a result obtained by the corresponding aggregation function.

Like the measure formula provided by ankitpatira or something like below.

avgSales = SUM( Table1[Sales] ) / MAX ( Table1[days in month] )

Devide by one time in a multiple values_1.jpg

 

Best Regards,

Herbert

View solution in original post

2 REPLIES 2
v-haibl-msft
Microsoft Employee
Microsoft Employee

@pvtrinh89

 

You only need to make sure the expression for days is a result obtained by the corresponding aggregation function.

Like the measure formula provided by ankitpatira or something like below.

avgSales = SUM( Table1[Sales] ) / MAX ( Table1[days in month] )

Devide by one time in a multiple values_1.jpg

 

Best Regards,

Herbert

ankitpatira
Community Champion
Community Champion

@pvtrinh89 in that case create measure as below. this will only work when you have dates only for one month. 

 

= sum([SALESCOLUMN]) / DISTINCT([days in month])

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors