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
Anonymous
Not applicable

Rate

Hi everyone,

 

I need a measure calculating the current value of another one (which is accumulative along the year) divided by the number of days passed of the year, i.e: I have sold 1000 € since January 1st and today is January 20th => 1000/20 = 50€

 

I've got the measure for the sales and I've added a new column to the Calendar table that shows the day of the year, but I am not able to create the measure I need dividing both elements, the measure editor don't let me. 

 

Many thanks in advance.

2 REPLIES 2
amitchandak
Super User
Super User

Try like

YTD Avg = divide( CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date]),"12/31")),
			CALCULATE(count(Date[Date]),DATESYTD(('Date'[Date]),"12/31")))
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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