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 September 15. Request your voucher.

Reply
gardas_swathi
Microsoft Employee
Microsoft Employee

Calculate Beginning Quarter Value

I need to calculate beginning inventory based on the quarter selection

 

CalendarDateFiscalQuarterDescFiscalYearNbrFiscalMonthNameCalendarYear
7/1/2019FY20-Q1FY20FY20-Jul2019
8/1/2019FY20-Q1FY20FY20-Aug2019
9/1/2019FY20-Q1FY20FY20-Sep2019
10/1/2019FY20-Q2FY20FY20-Oct2019
11/1/2019FY20-Q2FY20FY20-Nov2019
12/1/2019FY20-Q2FY20FY20-Dec2019
1/1/2020FY20-Q3FY20FY20-Jan2020
2/1/2020FY20-Q3FY20FY20-Feb2020
3/1/2020FY20-Q3FY20FY20-Mar2020
4/1/2020FY20-Q4FY20FY20-Apr2020
5/1/2020FY20-Q4FY20FY20-May2020
6/1/2020FY20-Q4FY20FY20-Jun2020

 

ValueDateProductID
30007/1/20191
40007/1/20192
20008/1/20191
10009/1/20191
500010/1/20191
400011/1/20191
20012/1/20191
90001/1/20201
50002/1/20201
6003/1/20201
45004/1/20201
25005/1/20201
3006/1/20201

 

If the Users Chooses Q1 with no filter on product , Beginning Inventory for Q1 should be 7000

Beginning inventory when user filters on Fiscal quarter Q2 , it should change to 5000.

 

How do i acheive this through DAX ?

 

Thanks in Advance

1 REPLY 1
Anonymous
Not applicable

first load both table in power Bi.

 

Create below calciulated column

First_month_of_Quarter = CALCULATE(MIN(Sheet5[CalendarDate]),ALLEXCEPT(Sheet5,Sheet5[FiscalQuarterDesc]))

 

Ten go to relationship tab and create relatiomn on First_month_of_Quarter to second date table.(Many to many)

 

Create measure

Starting_Inventory = SUM(Sheet4[Value])
 
and finally drag this measure and date column in table it will show expect result.
 
Capture5.PNG
 
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar

If I resolve your problem Mark it as a solution and give kudos.

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.