Forum Discussion
30/60/90 Day Filter from multiple columns
I'm doing a direct query to a SQL DB to pull all the go-live dates for a group of projects and present them in table form to show the go-lives in the next 30 days, another table for 30-60 days and another table for 60-90 days. I believe I've found posts to cover that part using a summary table, the issue I'm seeing is that I need this filter to look at 15 different columns for each project for these dates as we have projects with multiple go-lives. The end result would look something like this:
- Anonymous3 years ago
Hi kp_wood13 ,
Try to unpivot these date columns to get an attribute column contains headers and a value column contains dates.
Possible solutions:
1. Change the connection mode to import mode, and unpivot multiple date columns in Power Query to get one date column.
Unpivot columns - Power Query | Microsoft Learn
Power Query will always create the attribute-value pair by using two columns:
- Attribute: The name of the column headings that were unpivoted.
- Value: The values that were underneath each of the unpivoted column headings.
2.In the data source, SQL DB, unpivot multiple columns to get one date column.
Using PIVOT and UNPIVOT - SQL Server | Microsoft Learn
With single date column, you can easily filter.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi kp_wood13 ,
Try to unpivot these date columns to get an attribute column contains headers and a value column contains dates.
Possible solutions:
1. Change the connection mode to import mode, and unpivot multiple date columns in Power Query to get one date column.
Unpivot columns - Power Query | Microsoft Learn
Power Query will always create the attribute-value pair by using two columns:
- Attribute: The name of the column headings that were unpivoted.
- Value: The values that were underneath each of the unpivoted column headings.
2.In the data source, SQL DB, unpivot multiple columns to get one date column.
Using PIVOT and UNPIVOT - SQL Server | Microsoft Learn
With single date column, you can easily filter.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.