Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I have imported a PDF file into power query. It looks like the below.
Null position is very random. I cannot delete Row or Column based on filter...
I want to delete all null cells and need to move the text-contained cells into the left side. My expected outcome will be as below-
Solved! Go to Solution.
NewStep=Table.FormColumns(List.Zip(List.RemoveNulls(List.Transform(Table.ToRows(PreviousStepName),each if List.NonNullCount(_)=0 then null else List.RemoveNulls(_)))))
@wdx223_Daniel As a Consequence of this query, I am posting a new topic to identify a text format (for my case XXX-XX-XX, example 122-22-10). and then take that cells including the upper cells. If you can help, please help to advise on the new topic.
Link: How to identify a text format in power query - Microsoft Power BI Community
NewStep=Table.FormColumns(List.Zip(List.RemoveNulls(List.Transform(Table.ToRows(PreviousStepName),each if List.NonNullCount(_)=0 then null else List.RemoveNulls(_)))))
Tried to follow your formula. My bad luck is that this is not giving me results. Please help me how to apply?
@wdx223_Daniel Thanks. I sort it out. Thanks like magic. you are the real super user of PBI 🙂
= Table.FromColumns (List.Zip(List.RemoveNulls(List.Transform(Table.ToRows(#"Appended Query"),each if List.NonNullCount(_)=0 then null else List.RemoveNulls(_)))))
hi @MohsinBipu ,
reference :
The first link maps headers and checks if the column name contains "Column" after promotnig headers for nulls.
(25) Dynamically Remove Empty Columns in Power Query - YouTube
This one uses unpivot to remove nulls. might not be the best solution for this
(25) DYNAMICALLY Remove All Empty Columns with some M MAGIC in Power BI - YouTube
let me know if this resolves with your use case. if not, could you please provide sample input file removing sensitive information?
@adudani Thanks for the below link. I watched and learn new things. But this is solving my problem as my NULL are very random. Thanks.
Maybe there is another easy way to do this,
What I did is quite confusing:
1.- Select all columns and replace null for a special character that is not going to be in the data for example !
2.- Select all columns and merge all columns with the same special character as delimiter !
3.- Now you are going to have only 1 column. Select that column and replace values !! with nothing (an empty value)
4.- Select the column and split by delimiter !
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
10 | |
10 | |
8 | |
7 |