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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.