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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Vitore
Frequent Visitor

Challenge

I have two columns, the entry date of a product, and the leave date of a product. In another table i have a dimension table of days. 

I need to select a date in dimension table of days(as a filter), then this date filter the products that have entry date lower than the selected date, and calculate until the selected date how many days the product have betwen the entry date and selected date OR if lower than leave date, use the leave date to calculate. And i need the sum of days that the product stayed in stock.

Thnx for help.

3 REPLIES 3
v-deddai1-msft
Community Support
Community Support

Hi @Vitore ,

 

Would you please show us your expected output? I don't understand "OR if lower than leave date, use the leave date to calculate." well.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

I need to see how many days the item was in stock that month by the date i use was input, that is the diference of days  the item enter the stock until the day I input. However, this item could be out stock earlier than the day I use as input, than the function need first verify the leave date of product is less than the input date. If less use the leave date, if superior use the input date. The output is the sum of diference of days. 

littlemojopuppy
Community Champion
Community Champion

Hi @Vitore can you provide some sample data to work with?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.