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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Daily Average Production from month lump sum data

Hello, DAX experts

 

I have to calculate a measure (not a calculated column) to show DAILY production based on the number of calendar days in the reporting period. Production is a monthly entry in the Ledger. 

 

Expected result is for 

Jan 2020 is 391,106.81 divided by 31 days in Jan 2020, i.e. 12,616 units per day if I select Jan 2020 on visual (stacked monthly bar) of daily production for selected gas product, etc

 

I must say that the datatable contains various ledgers for actual, budget, forecast and then different type of gas products, etc. So I already have a measure that provides me monthly total production by gas product, but now I have to find daily average production. Ideas? 

 

LedgerAccount CodeAccounting PeriodUnit of Production
KSALEGAS2020/001-                                 391,106.81
KSALEGAS2020/002-                                 361,155.52
KSALEGAS2020/003-                                 361,305.28
KSALEGAS2020/004-                                 331,295.20
KSALEGAS2020/005-                                 335,115.11
KSALEGAS2020/006-                                 339,092.06
KSALEGAS2020/007-                                 318,675.72

 

 

Thanks in advance

Mira

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

Add the following column in your table

Daily Avg = 
VAR _Days = DAY(EOMONTH(DATE(LEFT(TRX[Accounting Period],4),RIGHT(TRX[Accounting Period],2),1),0))

return
DIVIDE(
    TRX[Unit of Production],
    _Days
)

 

Fowmy_0-1597338241677.png



________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@Anonymous 

Add the following column in your table

Daily Avg = 
VAR _Days = DAY(EOMONTH(DATE(LEFT(TRX[Accounting Period],4),RIGHT(TRX[Accounting Period],2),1),0))

return
DIVIDE(
    TRX[Unit of Production],
    _Days
)

 

Fowmy_0-1597338241677.png



________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.