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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
grggmrtn
Post Patron
Post Patron

Table.Group taking too much time

Our data is giving us redundencies that I need to correct for in PowerBI. It's a glitch that I can't get fixed within the data itself.

Basically what happens is that I get two rows that are *almost* identical - something like this:

 

PersonID	Service		Date		Received
1			A			1.1.2019	1
1			A			1.1.2019	0
1			A			2.1.2019	1
1			A			3.1.2019	1
1			B			1.2.2019	0
1			B			2.2.2019	0

 

 

There SHOULD be one line for each date, but every once in awhile I get two lines (like in the first two lines in the above table) - with the only difference being [Received].


I need some sort of filter that will DELETE the row if [PersonID], [Service], [Date] are identical, but where [Received]=0


I HAVE tried Table.Group but the actual data has 9 columns to group and not 3 like the dummy data, and a couple million rows, so it's taking hours. Is there another way to do this??

 

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @grggmrtn ,

 

Check this formula.

Measure = 
var countrow = CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[PersonID],'Table'[Service],'Table'[Date]))
return
IF(countrow<2,1,IF(SELECTEDVALUE('Table'[Received])=1,1,0))

Add it to visual filter should work.

2.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @grggmrtn ,

 

Check this formula.

Measure = 
var countrow = CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[PersonID],'Table'[Service],'Table'[Date]))
return
IF(countrow<2,1,IF(SELECTEDVALUE('Table'[Received])=1,1,0))

Add it to visual filter should work.

2.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@grggmrtn , You can try like. In data transformation remove received column and post that try delete duplicate rows

https://www.youtube.com/watch?v=QfFCPLOEyRU

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thanks for the reply @amitchandak 

But if I duplicate the query, remove [Received], delete duplicates and merge it back, how am I sure that it will keep the MAX value of [Received] in the original query?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.