Forum Discussion
Filter rows where difference between dates is lower than 31 days
Yes, of course!
To create the start and end dates I want I use this formula in Excel:
- "Startdate new":
Row 1: "=Startdate row 1"
Row 2-.. "=IF(
AND(
ClientID row 2 = ClientID row 1;
Startdate row 2= Startdate row 1;
Startdate row 2 < (Enddate row 1 + 31));
Startdate new row 1 ; Startdate row 2 )
- "Startdate new 2"
"=IF(Startdate new row 1 = Startdate new row 2;
""; Startdate new row 1)
- "Enddate new"
"=IF(Startdate new row 1 = Startdate new row 2;
""; Enddate row 1)
The I perform the steps of "Startdate new 2' and "Enddate new" also for "Product new" and "ClientID new". These steps all together make that I "group" these rows in a new table.
I really want to do this in Power BI, but I don't know how to do this. Maybe in Power Query??
Thanks all!
Niels