March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I need help with the following issue.
Here is an example of the table that I have as input (round about 650 rows):
Machine | WarrantyStart | WarrantyEnd |
A | 01.04.2018 | 30.03.2019 |
B | 03.05.2020 | 02.05.2022 |
C | 02.09.2021 | 01.09.2022 |
D | 19.01.2022 | 18.01.2023 |
E | 20.09.2022 | 19.09.2024 |
Now I need to know, during which time period we had, have and will have machines covered by warranty.
I'm not sure whether this works with a dim date table but I thought it could look like this:
Date | Count of machines in warranty | |
01.04.2018 | 1 | which is machine A |
... | ||
01.01.2022 | 2 | which are machines B and C |
02.01.2022 | 2 | which are machines B and C |
03.01.2022 | 2 | which are machines B and C |
... | ||
01.01.2023 | 2 | which are machines D and E |
... | ||
20.01.2023 | 1 | which is machine E |
... | ||
01.01.2025 | 0 |
First column is just an dim date table starting 01.01.2018 and ends 01.01.2030 and the 2nd column is the column that i need as result.
At the end I like to look 12 monthes back from today and make a forecast for the coming 12 monthes.
I would appreciate any help that I can get.
Many thanks in advance.
Sebastian
Solved! Go to Solution.
Hi @RichterSeb
You can refer to the following example.
The sample table is a date table
Create two columns in the date table
Count = var _filter=COUNTROWS(FILTER('Table',[Date]>=[WarrantyStart]&&[Date]<=[WarrantyEnd]))
return IF(_filter=BLANK(),0,_filter)
machines in warranty = var _fliter=FILTER('Table',[Date]>=[WarrantyStart]&&[Date]<=[WarrantyEnd])
return CONCATENATEX(_fliter,[Machine ],",")
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @RichterSeb
You can refer to the following example.
The sample table is a date table
Create two columns in the date table
Count = var _filter=COUNTROWS(FILTER('Table',[Date]>=[WarrantyStart]&&[Date]<=[WarrantyEnd]))
return IF(_filter=BLANK(),0,_filter)
machines in warranty = var _fliter=FILTER('Table',[Date]>=[WarrantyStart]&&[Date]<=[WarrantyEnd])
return CONCATENATEX(_fliter,[Machine ],",")
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Awesome. Thanks a lot. It worked.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
157 | |
97 | |
79 | |
69 |