Forum Discussion
markpendlebury
9 years agoFrequent Visitor
Remove Rows in Dataset based on most recent ID and email address
Hi everyone hope someone can help me.....I'm pretty new to PowerBI but loving how flexible it is. However, as anything new I've come up against something I think should be pretty simple. I have a...
- 9 years ago
I think this calculated table might be getting close. Just replace my Table2 with the name of your table
Table 3 = SELECTCOLUMNS( FILTER( CROSSJOIN( SELECTCOLUMNS( SUMMARIZECOLUMNS( 'Table2'[Email], "MAX ID", MAX('Table2'[ID]) ), "MAX Email",[Email], "MAX ID",[MAX ID] ) , 'Table2' ), 'Table2'[Email]=[MAX Email] && Table2[ID] = [MAX ID] ), "ID",[ID], "Email" , [MAX Email] )
Phil_Seamark
9 years agoMicrosoft Employee
I think this calculated table might be getting close. Just replace my Table2 with the name of your table
Table 3 = SELECTCOLUMNS(
FILTER(
CROSSJOIN(
SELECTCOLUMNS(
SUMMARIZECOLUMNS(
'Table2'[Email],
"MAX ID",
MAX('Table2'[ID])
),
"MAX Email",[Email],
"MAX ID",[MAX ID]
) ,
'Table2'
),
'Table2'[Email]=[MAX Email] &&
Table2[ID] = [MAX ID]
),
"ID",[ID],
"Email" , [MAX Email]
)markpendlebury
9 years agoFrequent Visitor
Phil_Seamark Thanks for this answer. I thought I might need to create this as a Table and this appears to work perfectly.
I did need to add my additional fields but that was pretty simple. Thanks
My original source table was 200,000 rows so I've had to restrict the incoming dataset (which is ok) as the refresh was timing out the Power BI Gateway but I think I've got that working now.
Thanks