Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 27 |
| User | Count |
|---|---|
| 134 | |
| 104 | |
| 63 | |
| 60 | |
| 55 |