YTD in accounting entries and sum of inventory entries from Since inception

I am developing financial report Profit & Loss Statement.
In this, have to show summary of Accouting entries and Inventory entries.
I have done Union of Accounting & Inventory entries as per below table

SELECTCOLUMNS(InventoryClosing,"Company",InventoryClosing[Company],"Amount",CONVERT(InventoryClosing[Amount],double),"GLName",InventoryClosing[GLAccountName],"Category",                            InventoryClosing[Category],"SubCateogry",InventoryClosing[SubCategory],"Amt",        InventoryClosing[Amount],"PostingDate",InventoryClosing[PostingDate]),

Created the following measure on PL table

FYTD Measure = TOTALYTD ( SUM ( PL[Amount] ), ‘Date’[Date], “03/31” )

PFYTD MEASURE = CALCULATE ( [FYTD Measure], DATEADD ( ‘Date’[Date], - 1, YEAR ) )

FQTD Measure = TOTALQTD( SUM ( PL[Amount] ), ‘Date’[Date])
PFQTD MEASURE = CALCULATE ( [FQTD Measure], DATEADD ( ‘Date’[Date], - 1, YEAR ) )

This report show data on YTD & QTD basis but i need sum value of inventory
entries from begining till date and accounting entries should be on basis
of YTD or QTD, need you help in this DAX formula.
Account Name of Inventory entries is different and fixed from Accounting entries.


Do you have a pbix sample of exactly what you are trying to achieve?


BS&PL.pbix (2.8 MB)

Hi Mark,

Kindly find the attached PBIX.



Hi @rajendermakhija,

Thanks for sharing pbix file. I am sorry that I am not accountant, so I could not completely understood about your requirements. What I understood is that you need accumulated total of Inventory value and not YTD/QTD. Please see if following formula works for you.

Inventory(Cummulative Total) =
    SUM ( 'vw_InventoryValue'[Amount] ),
    FILTER (
        ALL ( 'Date' ),
        'Date'[Date] <= MAX ( 'vw_InventoryValue'[PostingDate] )

Also, why don’t you have relationship between vw_InventoryValue’ and Date table?

Hi Hafiz,

That will do the calculation but i have to show Accounting and Inventory values in single column of Matrix Control, for this have made new table PL which is union of PL1(Accounting Entries) and Inventory Entries(Opening Inventory + Closing Inventory) and PL table have join with Date table. Can i put condition in "FYTD measure " that if value in Row column is Inventory Account than do accumulated Total other wise do TotalYTD/QTD.


Thanks for posting your question @rajendermakhija To receive a resolution in a timely manner please make sure that you provide all the necessary details on this thread.

Here is a potential list of additional information to include in this thread; demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

Including all of the above will likely enable a quick solution to your question.

PL Report.xlsx (15.2 KB)


Please find the attached sample of Excel which want to create in power bi.



Hi @rajendermakhija, Have you gone through this course here? - Course Introduction: Financial Reporting W/Power BI

Hi @rajendermakhija, we’ve noticed that no response has been received from you since the 3rd of March. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the checkbox. Thanks!