Forum Discussion

deb_power123's avatar
deb_power123
Icon for Helper V rankHelper V
4 years ago
Solved

Delete rows with duplicate entries in table using DAX or Tranformation

Hi,

I want to get rid of the rows containing Asia,Delhi then Asia,Shimla and Asia,Panjim as region and location in below table and also it has 100 enties like this[with same combination] .

 

Can we have any DAX or trasformation rule to handle this?

Input source table:

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



Expected Output:

 

RegionlocationAveragemarksSchoolName
IndiaDelhi90ABC
IndiaChennai85DEF
JapanTokyo88XYZ
IndiaShimla92WEF
IndiaPanjim78LMN
AsiaGoa66JKL
AsiaHongkong71OPP
AsiaKarachi41LMI
  • deb_power123 , Create a flag like this

     

    if([region] ="Asia" && [Location] in {"Delhi","Shimla","Panjim"} , 1, 0)

     

    You can use that in measure or visual level filter

     

    or create a new table

    calculatetable(Table, [Flag]=0)

3 Replies

  • deb_power123 , Create a flag like this

     

    if([region] ="Asia" && [Location] in {"Delhi","Shimla","Panjim"} , 1, 0)

     

    You can use that in measure or visual level filter

     

    or create a new table

    calculatetable(Table, [Flag]=0)

    • deb_power123's avatar
      deb_power123
      Icon for Helper V rankHelper V

      Hi amitchandak  I am not very clear with your approach, I tried the first approach but it shows only filter as 0 in the visual filter and 1 doesnt apprear.So, if 1 is not showing how will I be able to hide the entries for the first condition?Could you please suggest