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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Inventory turnover by month

Hello guys,

 

I need some hep, I m stuck. I try to create an monthly inventory turnover and monthly change %.

DateAmountBalance
11/01/2016100100
12/01/2016200300
01/01/201750350
02/01/2017100450
03/01/2017500950
04/01/20171001050

 

I've managed to created Balance column.

Balance = CALCULATE( SUM(Table[CostAmountTotal]), FILTER(  ALLSELECTED(Table[Period]),  ISONORAFTER(Table[Period], MAX(Table[Period]), DESC)))

 

But I'm not able to calculate monthly change %.I don't know how to make an reference to previous period.

Any  hints are usefull

 

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Assume the same data has two columns Date and Amount as you mentioned, we can create below calculated columns: 

 

Balance = CALCULATE(SUM('Table'[Amount]),FILTER('Table','Table'[Date]<=EARLIER('Table'[Date])))

 

MonthlyChange% = var premonth=CALCULATE(SUM('Table'[Amount]),FILTER('Table',EARLIER('Table'[Date])=DATEADD('Table'[Date],1,MONTH)))
return 
DIVIDE(CALCULATE(SUM('Table'[Amount])-premonth),premonth)

 

q5.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Assume the same data has two columns Date and Amount as you mentioned, we can create below calculated columns: 

 

Balance = CALCULATE(SUM('Table'[Amount]),FILTER('Table','Table'[Date]<=EARLIER('Table'[Date])))

 

MonthlyChange% = var premonth=CALCULATE(SUM('Table'[Amount]),FILTER('Table',EARLIER('Table'[Date])=DATEADD('Table'[Date],1,MONTH)))
return 
DIVIDE(CALCULATE(SUM('Table'[Amount])-premonth),premonth)

 

q5.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

thanks.

EARLIER function is very good.

Anonymous
Not applicable

@v-qiuyu-msft

 

Solution is working well, but I have a small problem.

The table is a summarized tabled calculated from a lot of transactions using summarize function.

In detail table I have a column , Category.

How to make possible to filterby this column and summarized table to be filtered ?

 

 

 

Joorge_C
Resolver II
Resolver II

You will need something like:

 

DATEADD(Calendar[Date},-1MONTH)

 

That -1 MONTH will be the interval to substract so you can get to the previous period of whatever Calendar[Date] you give.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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