Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Still-Learning
New Member

SIMPLE? - data modeling question

Hello,

I am newer to PowerBI so I appreciate any help. 

My desired end state is a table with one row per client and one column per documentation type. In the respective documentation type columns, I'd like to only see the most recent document completed for that client.

As you can see below, there are multiple rows for each client as well as multiple rows for each matching documentation type and their dates, typically a year apart. For example, for Joe, there are two assessments and two action plans but I'd like to see one row for Joe and an Assessment column and an Action Plan column. In the columns, I'd like to have his 1/1/20 assessment and 2/14/20 action plan.

I tried, simply, pivoting on the doc type columnw ith the date column as the value but because there are multiples of each doc type for each client, it is returning multiple rows.

Ideally, I'd love this to be done within PBI rather than in the source file since I am doing a combine and load from folder refresh.

A sample of the data is below.

thank you for your help.

 

ClientDocument TypeDate of Document
Joeassessment1/1/2020
Karenassessment1/5/2020
MarkAssessment1/9/2020
Karenaction plan2/9/2020
Joeaction plan2/14/2020
Billassessment1/16/2020
Billaction plan2/2/2020
Joeassessment1/3/2019
Karenassessment1/9/2019
MarkAssessment1/8/2019
Karenaction plan2/4/2019
Joeaction plan2/10/2019
Billassessment1/17/2019
Billaction plan2/9/2019
3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @Still-Learning ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @Still-Learning ,

 

If you want to visual it as a table, we can just put the date in filed and set it summarize as latest date:

 

2.jpg

 

If you want to get a actual table, we can create a calculated table as following:

 

Calculated Table = SUMMARIZE('Table','Table'[Client],'Table'[Document Type],"MaxDate",MAX('Table'[Date of Document]))

 

3.jpg

 

Or create the table in power query editor by using group by:

 

4.jpg5.jpg

 


If it doesn't meet your requirement, Could you please show the exact expected result based on the tables that you have shared?


By the way, PBIX file as attached.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
parry2k
Super User
Super User

@Still-Learning add the following measure

 

Max Date by Client and Dco Type = CALCULATE ( MAX ( 'Table'[Date of Document] ), ALLEXCEPT ( 'Table', 'Table'[Client], 'Table'[Document Type] ) )

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

 



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.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.