Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi everyone!
Want to create a query step* where the first column of a table is removed (and then the rest of the columns get renamed) only if a specific value** inside that table is null. Otherwise, the table is passed to the next step as is.
------------------------------------------
This is how I tried implementing it, but please also feel free to propose a solution from scratch instead of correcting the mess I created; since I am pretty new to Power BI don't know how much sense my solution makes in the first place 😂
Draft Solution
= if ISBLANK(#"Navigation"{3}[Column1]) then
(Table.RemoveColumns(#"Navigation",{"Column1"}) and
Table.RenameColumns{{"Column2", "Column1"}, {"Column3", "Column2"}, {"Column4", "Column3"}, {"Column5", "Column4"}, {"Column6", "Column5"}, {"Column7", "Column8"}, {"Column8", "Column9"}})
else #"Navigation"
(Note that the table comes after a Navigation step so I reference it as #"Navigation" and the value** that gets checked is the third row of the first column.)
Thank you very much for your time!
Notes
* It could also be a function, if that's easier to implement.
** If that value is null, then the whole column is null; however, it's not that this cell has a special importance or anything -
might as well do a check at the column level. Just thought that checking only one value would improve performance.
I don't know how to do it:( Maybe admins helps us..
I suppose that you don't need DAX in your case
Hmmm, then is there any way to move this to another forum?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |