This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I have the following question on creating a new table.
My table consists of the following example:
CURRENT TABLE
Customer Date Image
A 10/1/2017 Image 1
A 10/2/2017 Image 2
B 9/1/2017 Image 6
B 10/3/2017 Image 7
I need to create a new table that shows the following by grabbing all row data from the latest dates
NEW TABLE
Customer Date Image
A 10/2/2017 Image 2
B 10/3/2017 Image 7
I've tried many iterations of summarizing the table but can't seem to get it to work.
Any help would be greatly appreciated.
Thanks,
PMike.
Solved! Go to Solution.
If you want a calculated table. Try this.
Go to modelling tab...Press "New Table"
New Table =
ADDCOLUMNS (
SUMMARIZE (
CurrentTable,
CurrentTable[Customer],
"Max Date", MAX ( CurrentTable[Date] )
),
"Image", CALCULATE (
SELECTEDVALUE ( CurrentTable[Image] ),
FILTER (
CurrentTable,
CurrentTable[Date] = [Max Date]
&& CurrentTable[Customer] = EARLIER ( CurrentTable[Customer] )
)
)
)
All, thank you for great solutions. I am going to run these through today to test.
Hi,
Try these calculated field formulas
Last date = MAX(Data[Date])
Image on last date = LOOKUPVALUE(Data[Image],Data[Date],[Last date])
Add a column using following expression to flag the most recent record and then filter on that
Recent = var r = RANKX(FILTER(Image, Image[Customer] = EARLIER(Image[Customer])), Image[Date], , DESC, DENSE) return if(r = 1, "Yes", "")
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
If you want a calculated table. Try this.
Go to modelling tab...Press "New Table"
New Table =
ADDCOLUMNS (
SUMMARIZE (
CurrentTable,
CurrentTable[Customer],
"Max Date", MAX ( CurrentTable[Date] )
),
"Image", CALCULATE (
SELECTEDVALUE ( CurrentTable[Image] ),
FILTER (
CurrentTable,
CurrentTable[Date] = [Max Date]
&& CurrentTable[Customer] = EARLIER ( CurrentTable[Customer] )
)
)
)
Thanks Zubair, this was exactly what I was looking to accomplish.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 23 | |
| 22 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 41 | |
| 27 | |
| 22 | |
| 20 |