Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi there,
I hope that you are able to help me with my problem.
In the example table below, I am trying to calculate Column D where I’d like to display the latest “Process Date” (Column C) for each “Project ID” (Column A).
In other words, all Project ID rows should display 19th of November 2018 in Column 4.
I tried LOOKUPVALUE and CALCULATE functions but haven’t been able to get this to work.
Any advice is most welcome!
| Project ID | Final Total | Process Date | Required Result |
| 1 | 1000 | 15/05/2018 | 19/11/2018 |
| 1 | 1500 | 27/09/2018 | 19/11/2018 |
| 1 | 2000 | 19/11/2018 | 19/11/2018 |
| 2 | 500 | 13/07/2018 | 21/09/2018 |
| 2 | 750 | 21/09/2018 | 21/09/2018 |
| 3 | 250 | 23/02/2018 | 25/12/2018 |
| 3 | 500 | 17/06/2018 | 25/12/2018 |
| 3 | 900 | 25/12/2018 | 25/12/2018 |
Solved! Go to Solution.
No worries. You can just add the filter on Category back in after the ALLEXCEPT
Final Date =
CALCULATE (
MAX ( Project[Process Date] ),
ALLEXCEPT ( Project, Project[Project ID] ), //Removes all contexts/filters except for Project ID
Project[Category] = "Rock" //Adds back in a filter on category
)This type of thing is perfect for Power Query. Here's the final table I got:
You can see what I did in Power Query and the applied steps.
Here is the file:
Hi, the link to the workbook is invalid. Can you please share again?
Hi, the link to the workbook is invalid. Can you please share again?
Try this:
Final Date =
CALCULATE(
MAX(Project[Process Date]),
ALLEXCEPT(Project, Project[Project ID])
)
Hope this helps
David
| Project ID | Category | Final Total | Process Date | Required Result |
| 1 | Rock | 1000 | 15/05/2018 | 19/11/2018 |
| 1 | Paper | 1500 | 27/09/2018 | 19/11/2018 |
| 1 | Rock | 2000 | 19/11/2018 | 19/11/2018 |
| 2 | Rock | 500 | 13/07/2018 | 13/07/2018 |
| 2 | Paper | 750 | 21/09/2018 | 13/07/2018 |
| 3 | Rock | 250 | 23/02/2018 | 17/06/2018 |
| 3 | Rock | 500 | 17/06/2018 | 17/06/2018 |
| 3 | Scissors | 900 | 25/12/2018 | 17/06/2018 |
No worries. You can just add the filter on Category back in after the ALLEXCEPT
Final Date =
CALCULATE (
MAX ( Project[Process Date] ),
ALLEXCEPT ( Project, Project[Project ID] ), //Removes all contexts/filters except for Project ID
Project[Category] = "Rock" //Adds back in a filter on category
)Hi David,
Thank you very much for the solution! It works exactly as required.
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 |
|---|---|
| 55 | |
| 34 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 74 | |
| 71 | |
| 38 | |
| 35 | |
| 25 |