The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Dear all, I have the following table:
and I would like to achive the following result for each of the categories in the first column:
Shortly, I need a new table where dates will be "compressed" into one row. In case where more then one dates per column are availbale, the closest to today's date should be prefered (e.g. in the penultimate column 08.06 is prefered over 09.01). This should be achived ideally in PowerQuery.
Many, many thanks in advance!
=Table.Group(PreviousStepName,"Categories",List.Transform(List.Skip(Table.ColumnNames(PreviousStepName)),(x)=>{x,each List.MinN(Table.Column(_,x),1,each Number.Abs(Duration.TotalDays(DateTime.From(_)-DateTime.LocalNow()))){0}?}))