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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
deb_power123
Helper V
Helper V

DAX to remove duplicate row entries

Hi,

 

For the source table below , I have repeated rows one for India and another for Delhi location .

 

Another for India and Goa location. 

 

I want to hide all those rows with India(marked in bold in the below table) location and want to only keep the rows with Delhi and Goa location .I have many enteries like this so it should be don via some DAX. Please suggest.

 

Source Indput:

SchoollocationAveragemarks
ABCIndia90
ABCDelhi90
DEFIndia89
DEFDelhi89
DEJIndia75
DEJGoa75
DEMIndia97
DEMGoa97

 

Expected Output :

SchoollocationAveragemarks
ABCDelhi90
DEFDelhi89
DEJGoa75
DEMGoa97

 

Kind regards

Sameer

1 ACCEPTED SOLUTION

Hi, @deb_power123 

No dax can identify whether the type of a field is a region or a country.

For the 100 entries for the combinations, you can only consider removing the data by looking for keywords.

Please add a filter measure and apply it to visual filter pane to filter data:

Ex:

Measure = IF(MAX('Table'[Region]) in {"Asia","Europe"},0,1)

or

Measure1 = IF(CONTAINSSTRING(MAX('Table'[Region]),"Asia")||CONTAINSSTRING(MAX('Table'[Region]),"Europe"),0,1)

2.png

Please let me know if I misunderstood.

 

Best Regards,
Community Support Team _ Eason

View solution in original post

5 REPLIES 5
v-easonf-msft
Community Support
Community Support

Hi, @deb_power123 

If you want to use DAX to remove duplicate row entries, @koorosh 's solution could work for you.

1.png

If your problem has been solved, please accept @koorosh's reply as solution to close this thread, so that other community members will easily find the solution when they get the same issue.

 

Best Regards,
Community Support Team _ Eason

I want to get rid of Asia,Delhi then Asia,Shimla and Asia,Panjim in below table and also it has say 100 enties for the combinations .Can we have any DAX or trasformation rule to handle this?

 

RegionlocationAveragemarksSchoolName
AsiaDelhi90ABC
IndiaDelhi90ABC
IndiaChennai85DEF
JapanTokyo88XYZ
AsiaShimla92WEF
IndiaShimla92WEF
AsiaPanjim78LMN
IndiaPanjim78LMN
AsiaGoa66JKL
AsiaHongkong71OPP
AsiaKarachi41LMI



Hi, @deb_power123 

No dax can identify whether the type of a field is a region or a country.

For the 100 entries for the combinations, you can only consider removing the data by looking for keywords.

Please add a filter measure and apply it to visual filter pane to filter data:

Ex:

Measure = IF(MAX('Table'[Region]) in {"Asia","Europe"},0,1)

or

Measure1 = IF(CONTAINSSTRING(MAX('Table'[Region]),"Asia")||CONTAINSSTRING(MAX('Table'[Region]),"Europe"),0,1)

2.png

Please let me know if I misunderstood.

 

Best Regards,
Community Support Team _ Eason

koorosh
Post Partisan
Post Partisan

CALCULATETABLE('Sheet1',KEEPFILTERS('Sheet1'[Location] in {"India"} = False))


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos!
johnt75
Super User
Super User

Change the visual filter on the table to exclude India

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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