Forum Discussion
Conditional unpivoting date columns in power query
- 4 years ago
This works perfectly well. Download from here...
I have tried this, however, it only unpivots the columns with the same attributes names. For example, in the first file, I had highlighted the columns other than date columns and selected 'unpivot other columns'. After I uploaded the second file, the power query only unpivots until 3/21/2022 column, the rest starting from 3/28/2022 were ignored.
Use this as your Unpivot command (replace #"Changed Type" with your previous step)
= Table.Unpivot(#"Changed Type", List.RemoveNulls(List.Transform(Table.ColumnNames(Source),(i)=> try Text.From(Date.FromText(i)) otherwise null)), "Attribute", "Value")
- Anonymous4 years agoNot applicable
Unfortunately, it comes with this error
- Vijay_A_Verma4 years agoMost Valuable Professional
Can you give me your Excel file with 2-3 lines of data? You can change the data if the data is confidential.
Please upload the file without confidential/sensitive data to a cloud storage service such as Onedrive/Google Drive/Dropbox/Box (Onedrive preferred) and share the link here.
- Anonymous4 years agoNot applicable
https://drive.google.com/drive/folders/1fkjomtnrIDO0AFYm_X081mkRTgDvYbPn?usp=sharing
Here is the dataset. I had to manipulate the data since it is confidential. The column names remain the same, only the row data changed. Basically, I need to create a dashboard to calculate the changes of forecasted unit between the same dates for different files generated every week. Really appreciate if you can help. Thank you.