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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
VinayPanch00
Frequent Visitor

how to remove specific data based on unique value

hi

I need help as you see from my rank, either DAX or power Query will work for me.

 

I have a huge table, let's call it BI, the table is sorted by date, one of the columns "order" gets repeated with totaltax, what I want is a way to add one more column which will show totaltax only once and the rest are blank. 

My original table is - 

 

TermordertypeDate totaltaxtotaltax
M38426To Go06/03/202113400
M28426To Go06/03/202113400
M28426To Go06/03/202113400
M48454To Go06/03/202123013.69209.19
M48454To Go06/03/202123013.69209.19
M48454To Go06/03/202123013.69209.19
M48454To Go06/03/202123013.69209.19
M48454To Go06/03/202123013.69209.19
M48454To Go06/03/202123013.69209.19
M48454To Go06/03/202123013.69209.19
M48454To Go06/03/202123013.69209.19
M48454To Go06/03/202123013.69209.19
M48455To Go06/03/20211488.81134.61
M48455To Go06/03/20211488.81134.61
M48455To Go06/03/20211488.81134.61
M48455To Go06/03/20211488.81134.61
M48455To Go06/03/20211488.81134.61
M48455To Go06/03/20211488.81134.61
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94
M58452To Go06/03/202144230.94472.94

 

So want to add one more column uniquetotal to table to show like this 

TermordertypeDate totaltaxtotaltaxuniquetotal
M38426To Go06/03/2021134000
M28426To Go06/03/202113400 
M28426To Go06/03/202113400 
M48454To Go06/03/202123013.69209.19209.19
M48454To Go06/03/202123013.69209.19 
M48454To Go06/03/202123013.69209.19 
M48454To Go06/03/202123013.69209.19 
M48454To Go06/03/202123013.69209.19 
M48454To Go06/03/202123013.69209.19 
M48454To Go06/03/202123013.69209.19 
M48454To Go06/03/202123013.69209.19 
M48454To Go06/03/202123013.69209.19 
M48455To Go06/03/20211488.81134.61134.61
M48455To Go06/03/20211488.81134.61 
M48455To Go06/03/20211488.81134.61 
M48455To Go06/03/20211488.81134.61 
M48455To Go06/03/20211488.81134.61 
M48455To Go06/03/20211488.81134.61 
M58452To Go06/03/202144230.94472.94472.94
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 
M58452To Go06/03/202144230.94472.94 

 

any help will be greatly appreciated

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@VinayPanch00 why do you have those duplicate rows in the first place? What's the meaning of the same 2 rows in your data? Do you have more columns there that distinguish beteween those rows? 
If not, and you need to keep those duplicates, you will need to add another column in your datasource or Power Query to be unique (at least unique between the groups of duplicates ) and then it can be solved. For example, I added a simple index column in Power Query and then continued to solve this in DAX calculatd column.
here is a link to download the file with the solution:
how to remove specific data based on unique value 2022-07-18.pbix
 


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

View solution in original post

5 REPLIES 5
VinayPanch00
Frequent Visitor

Thank you this really helps

@VinayPanch00  my pleasure 🙂
P.S. Check out my showcase report - got some high level stuff there. Sure you will find there a lot of cool ideas. 
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up over there if you liked it 🙂

VinayPanch00
Frequent Visitor

hi @SpartaBI 

yes the full table has roughly 45 columns and I do need them for other charts

 

Vinay

@VinayPanch00 ok, did you see the solution I shared? Basically I need a column to sort the duplicate rows. I added an index column but maybe you already have something like that in your table so you could use that instead of the index column I added and replace it in the code.
Please look at the solution I shared.

SpartaBI
Community Champion
Community Champion

@VinayPanch00 why do you have those duplicate rows in the first place? What's the meaning of the same 2 rows in your data? Do you have more columns there that distinguish beteween those rows? 
If not, and you need to keep those duplicates, you will need to add another column in your datasource or Power Query to be unique (at least unique between the groups of duplicates ) and then it can be solved. For example, I added a simple index column in Power Query and then continued to solve this in DAX calculatd column.
here is a link to download the file with the solution:
how to remove specific data based on unique value 2022-07-18.pbix
 


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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