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

Help... Make one measure from all dates up to set date in specified period. Other Measures by period

oswt hasI'm hoping someone has the solution to my problem, I'm thinking that I'm just doing this the wrong way...

The data is based on a table called Item_Entries.

 

The table consists of rows, these have data with Amount, Amount Sold, Remaining Amount, Salesprice, Costprice.

 

What I need is to be able to select a date period, could be 01/01/20 to 30/06/20.

The "Total sales in period" column works fine, since it looks at the entries in the filtered period, and looks at total sale amount (salesprice * total Amount Sold).

 

My issue is with the first column, "Inventory Amount".

This column needs to use the "Remaining amount" data on the Item Entries. The problem here is that i need this measure/column to look at ALL data, from the very beginning, to the last date specified in my filter. So this measure actually needs to look at data from company start date, to the last date of my filter. That would be 01/01/18 to 30/06/20.

 

How do I handle this? I'm assuming I need to remove the filter on the "Inventory Amount" measure, and then apply something that always picks filter from start, to the last specified dato. I just cannot figure how to do this, and maybe I'm just going at this all wrong.

 

I'm hoping someone will be able to figure out what I'm trying to do.

 

Thanks in advance.

 

 

Item No.Inventory amountInventory value (cost)Inventory value (salesprice)Total sales in periodInventory days by months
1140,746281,492562,984140,000x
2100,414150,621301,242 x
3     
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Hope you date is joined with time table you can create a cumulative like given example

Example

Cumm = CALCULATE(SUM(Sales[Sales Amount]),filter(all(date),date[date] <=maxx(date,date[date])))
Cumm = CALCULATE(SUM(Sales[Sales Amount]),filter(all(date),date[date] <=max(Sales[Sales Date])))

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Hope you date is joined with time table you can create a cumulative like given example

Example

Cumm = CALCULATE(SUM(Sales[Sales Amount]),filter(all(date),date[date] <=maxx(date,date[date])))
Cumm = CALCULATE(SUM(Sales[Sales Amount]),filter(all(date),date[date] <=max(Sales[Sales Date])))

 

Anonymous
Not applicable

Thanks so much, that solved it! Was just what i was looking for

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.