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
Jdsarmientoc
Frequent Visitor

Stock age measure range and show how many items in each range

Hi everyone!

Im currently trying to do an inventory age report.

First i wanted to calculate the inventory age (today - inbound date). (MEASURE 1)

Then i wanted to assign this result to a range of ages (MEASURE 2) and finally i want to create a table with the ranges and then show how many items are in that range of age (MEASURE 3).

Also i want to put a secondary table next to it of Items and # of units so when i click a range it filters the secondary table to show which items are on this range and how many units i have in stock of each item.

 

I've already managed to do the MEASURE 1 and MEASURE 2 like this, respectively:

On this first one i have to filter by warehouse because im only interested in some of the warehouses data, not all of them.

Antigüedad (días) = calculate(AVERAGEX('Inv Actual';today()-[Fecha última entrada]);FILTER('Inv Actual';'Inv Actual'[Bodega]="5003"||'Inv Actual'[Bodega]="PTT"||'Inv Actual'[Bodega]="BET"||'Inv Actual'[Bodega]="PTE"||'Inv Actual'[Bodega]="ACS"||'Inv Actual'[Bodega]="5001"||'Inv Actual'[Bodega]="5002");'Inv Actual'[Existencia]>0)
Rangos = switch(TRUE();
[Antigüedad (días)]=BLANK();BLANK();
[Antigüedad (días)]<30;"< 30";
[Antigüedad (días)]>=30 && [Antigüedad (días)] <90;"30-90";
[Antigüedad (días)]>=90 && [Antigüedad (días)] <180;"90-180";
[Antigüedad (días)]>=180 && [Antigüedad (días)] <360;"180-360")

 Captura.PNG

Items is where i have all the information of the items and its related to all the other tables with the Item ID.

 

Now what i would like to do is to create a table visual with the Ranges as Rows and the <number of items in that range> as value but cant use a measure (MEASURE 2) as Rows. As soon as i drag the measure to the table it shows me the result of the measure for all my data.

 

In case my explanation is hard to understand ill show my amazing paint skills to show what i would like (left table i already have in BI, right table is in excel):

Foro.png

And whenever i click a range in the right table i want it to filter the left table to show which items are so if i click the 180-360 range it shows me those 7 items on the left table.

 

Thanks and hope you can help!

 

PS: As you can imagine english is not my first language so please excuse me on that.

 

David.

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@Jdsarmientoc ,

 

Just remove the column [Item Id] and [Existenca] from the table visual and check if the left is same with the right.

 

Regards,

Jimmy Tao

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.