Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I can't find anything exactly like what I'm trying to accomplish, so I need a bit of help.
I have a data set where I have some problem children that i need to remove from the data set entirely.
I need to keep the most recent date for each status and ID.
here's what they look like:
ID1 | Status1 | Date1 |
| ID1 | Status1 | Date2 |
| ID1 | Status1 | Date3 |
| ID1 | Status2 | Date4 |
| ID1 | Status2 | Date5 |
| ID1 | Status2 | Date6 |
| ID2 | Status1 | Date7 |
| ID2 | Status1 | Date8 |
| ID2 | Status1 | Date9 |
| ID2 | Status2 | Date10 |
| ID2 | Status2 | Date11 |
Desired State:
| ID1 | Status1 | Date3 |
| ID1 | Status2 | Date6 |
| ID2 | Status1 | Date9 |
| ID2 | Status2 | Date11 |
Thanks!
Solved! Go to Solution.
Hi @Anonymous
create new calculated table
Table 2 =
FILTER(
ADDCOLUMNS('Table', "Rank", RANKX(FILTER('Table', 'Table'[Status]=EARLIER('Table'[Status]) && 'Table'[ID]=EARLIER('Table'[ID])),'Table'[Date],,DESC)),
[Rank]=1
)
Hi @Anonymous
create new calculated table
Table 2 =
FILTER(
ADDCOLUMNS('Table', "Rank", RANKX(FILTER('Table', 'Table'[Status]=EARLIER('Table'[Status]) && 'Table'[ID]=EARLIER('Table'[ID])),'Table'[Date],,DESC)),
[Rank]=1
)
Nailed it. You're my new hero.
😁
Also,
anyone with the same problem...
You'll need to recreate in the created table any calculated columns (and I'm assuming measures) that you had already created in the original table. otherwise you may have bad data if you were pulling from one of the rows that got removed.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |