Forum

Maxifs and Minifs i...
 
Notifications
Clear all

Maxifs and Minifs in Power query

4 Posts
2 Users
0 Reactions
956 Views
(@kanwal)
Posts: 2
New Member
Topic starter
 

Hi there,

I am looking to learn / solution in power query to find out Max Date and Min Date in 2 seprate columns for each row.

I can achive this easily in excel by using Minifs and Maxifs but for the sake for automation I would like to implement the same in power query. I have attached the sample data.

There are two sheets in file (1st sheet called AdherenceDetails and 2nd sheet Outcome). AdherenceDetails has raw data and Outcome has additional two column (highlighted yellow) where Maxifs and MINifs formula has been implemented. Any help would be greatly appriciated.

Thank you,

Kanwal

 
Posted : 27/12/2020 1:50 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Kanwal,

Welcome to our forum! You can use the Group By tool to find the max and min dates, then merge those dates back to the original data. See the Query sheet in the attached file.

Mynda

 
Posted : 27/12/2020 9:29 pm
(@kanwal)
Posts: 2
New Member
Topic starter
 

Great efforts Mynda,

I am new to power query so I would need some written instructions, how you have achived this (step by step) please.

Thank you for your help.

Kanwal

 
Posted : 28/12/2020 7:36 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Kanwal,

If you click on the Applied Steps in the file I attached you can see each step I took. If you need further guidance then I recommend you take my Power Query course as there's far too much to write in a forum post, sorry.

Mynda

 
Posted : 28/12/2020 7:42 pm
Share: