Forum Discussion

VinayPanch00's avatar
VinayPanch00
Frequent Visitor
4 years ago
Solved

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

  • 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
     





          

    Showcase Report – Contoso By SpartaBI

5 Replies