Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
deb_power123
Helper V
Helper V

Delete some rows completely with dependent columns in trasformation in PowerBI

Hi All,

 

I have a table Students with two columns in my input source data as shown  below :-

Here Building and Floor are dependent columns for eg : Building A has 4 floors Floor1 through Floor4 and so on.

I will be showing this in my table matrix so in my tranformation, I need to exclude some of the rows to obtain the expected output.

Input Data :

Building   Floor
A Floor1
A Floor2
A Floor3
A Floor4
 Floor5
B Floor7
B Floor11
C Floor15
D Floor1
D Floor3
E Floor5
E Floor8
E Floor9
E Floor10

 

Expected output :-

Building   Floor
A 
A 
A Floor3
A Floor4
 Floor5
B 
B Floor11
C Floor15
D Floor1
D 
E Floor5
E Floor8
E Floor9
E 

 

Finally the data after deletion or exclusion, should look like this.  :-

 

Building   Floor
A Floor3
A Floor4
 Floor5
B Floor11
C Floor15
D Floor1
E Floor5
E Floor8
E Floor9

 

Could someone please suggest how we can achieve this through any DAX or any other method? How can I delete or exclude the unwanted rows where with dependent columns.

 

Kind regards

Sameer

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @deb_power123 

According to your description and sample data, I think that you can just simply use the “Filter data” function in the Power Query to prevent the rows with blank value in the [Floor] column to be imported into the Power BI, like this:

v-robertq-msft_0-1623809144375.png

 

And you can get what you want, like this:

v-robertq-msft_1-1623809144377.png

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

What is the criteria for excluding rows?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-robertq-msft
Community Support
Community Support

Hi, @deb_power123 

According to your description and sample data, I think that you can just simply use the “Filter data” function in the Power Query to prevent the rows with blank value in the [Floor] column to be imported into the Power BI, like this:

v-robertq-msft_0-1623809144375.png

 

And you can get what you want, like this:

v-robertq-msft_1-1623809144377.png

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thankyou 🙂

amitchandak
Super User
Super User

@deb_power123 , what is the logic to delete or remove. because 2nd table says expected output

Hi @amitchandak 

we dont want these rows so i want to remove them all so that my table matrix doesnt contain them.

It is a specific set of row which we donot want and it corresponds to the dependent column Building and Floor.

 

Can any DAX help in this case? Like filter dax where I want to remove all the rows say for Building A which corresponds to floor 1 and 2.I just want to remove all the rows corresponding to it.

 

Kind regards

Sameer

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.