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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.