The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hey everyone,
I've been at this for a while, it feels like it shouldnt be this hard. Any help greatly appreciatied.
I have a table of data with Corporate Officers - I want to show the MAX DATE or MOST RECENT DATE for each Officer Position. In other words, if we appoint a new Secretary, President etc. in this expression I only want to show the MOST RECENTLY appointed officer.
Below is a sample of the table - highlighted are the officers that have been superceeded by new appointees.
Thank again!
Solved! Go to Solution.
Do a grouping on the company id and position and aggregate by max appointment_date, but add a "all rows" aggregate.
Then expand the tables back out (without the company id and position fields) and then mark all rows where the appointment_date matches the max appointment date.
Hi @amart ,
Your requirement is to keep the row with the largest appointment_date if company_id and position are same.
Please follow my steps if I understand you correctly:
My approach is somewhat similar to @lbendlin is, with slight differences in the details, thank him very much.
Go to Power Query and select company_id and position columns for group by.
To this step has realized your needs.
If you have other questions please feel free to contact me.
The pbix file is attached.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @amart ,
Your requirement is to keep the row with the largest appointment_date if company_id and position are same.
Please follow my steps if I understand you correctly:
My approach is somewhat similar to @lbendlin is, with slight differences in the details, thank him very much.
Go to Power Query and select company_id and position columns for group by.
To this step has realized your needs.
If you have other questions please feel free to contact me.
The pbix file is attached.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Do a grouping on the company id and position and aggregate by max appointment_date, but add a "all rows" aggregate.
Then expand the tables back out (without the company id and position fields) and then mark all rows where the appointment_date matches the max appointment date.
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |