Forum Discussion
Most efficient way to create reference tables from original table
- 4 years ago
Hi Anonymous
That's why I asked you to share sample data...Your previous sample is incomplete.
Try this:
Last Booking Date = MAXX ( FILTER ( ALL ( table ), [Parent Cust ID] = SELECTEDVALUE ( table[Parent Cust ID] ) ), [Booking Date] )Best Regards,
Community Support Team _Janey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous Two ways to handle it:
- if you want to use PQ, keep all transformations in one table and use it as a reference.
- or best way is to use DAX measure, no additional tables will be required, just use one table with all the transformation and thru measure achieve the result. In the above example, just add a below measure and in table visual, put parent id and the measure, it should work
Last Booking Date = MAX ( Table[Booking Date] )
✨ Follow us on LinkedIn and to our YouTube channel
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
Perfect, thank you. 😁 DAX is a much better way of course! 🙄
Ok, so next problem (sorry!). I actually need to expose the MAX(Last Booking Date) across all Customer entities associated with the Parent Customer. If I create a measure using Last Booking Date = MAX ( Table[Booking Date] ) then I get the Last Booking Date for the individual Customer in my report - which is at Customer Level.
This is what I'm after, i.e. the Parent Last Booking date is the MAX of all Booking Dates associated with child Customer entities.
| Cust ID | Cust Last Booking Date | Parent Cust ID | Parent Last Booking Date |
| 1234 | 01/12/20 | 9999 | 15/03/21 |
| 4567 | 15/03/21 | 9999 | 15/03/21 |
Thanks!
- v-janeyg-msft4 years ago
Community Support
Hi, Anonymous
So what should be the correct result?
Can you share some sample data? So we can modify the code according to the field.
Janey