Forum Discussion
Create table using LET based on column values
Thank you for your reply and assistance!
Sadly Power Query & Macros is blocked in my work organisation so I am restricted to LET.
When implementing your example, I get a few #N/As on columns and also the issue where if the value is blank, a 0 is being displayed.
Can this formula be modified to work on the following logic?
If the value is empty, the whole row is not repeated?
For example these highlighted would not be displayed and the overall order would still align.
The attached removes the rows with 0s.
For the columns, the width must match the width of the selected values (even if the columns are blank). If your example presents a differently arranged header then a sample may be needed.
- Matt_PazJun 20, 2025Copper Contributor
Hi Patrick
Thanks for your time supporting me here.
I attach a live example of what dataset / table structure I am trying to apply this to.
You will see the top table (original data table) and the desired output I am looking for underneath.
If the Team result is empty, no data is shown in the desired output.
Your support is much appreciated
Matt
- Patrick2788Jun 21, 2025Silver Contributor
This will do it. The function is made specifically for this arrangement. Essentially, this is doing what PowerQuery would be doing with changing the order of columns and then unpivoting.
- Matt_PazJun 23, 2025Copper Contributor
Thanks again Patrick. This works perfectly. Silly question but should I want to include another column from the initial table, is it just a question of updating the "matrix" range from say $A$2:$U$16 to say $A$2:$V$16?