Forum Discussion
Earliest date for employee - Power Query Editor
- 8 years ago
Hi Lucjan_Szulik,
Don't know what you want to calculate but believe that the best way is to use measures because calculated columns have additional space to your model and complexity.
But the options you have for creating the column are DAX and M language see below both options.
DAX Calculated column:
Minimum Date Dax = CALCULATE ( MIN ( Dates_DAX[Date] ); FILTER ( Dates_DAX; Dates_DAX[ID] = EARLIER ( Dates_DAX[ID] ) ) )M Language:
- On query editor select group by
- Group by ID
- Operation Min - Date
- Operation - All Rows
- Expande table values
See below result for both columns and attach PBIX file.
Regards,
MFelix
- On query editor select group by
Hi,
Need it for calculating absenteeism per seniority.
I have another table with scheduled hours and all the present/absenteeism. I need to add seniority of every agent on the given day and base on that build some visualizations.
Thanks,
Lucjan
Hi Lucjan_Szulik,
Don't know what you want to calculate but believe that the best way is to use measures because calculated columns have additional space to your model and complexity.
But the options you have for creating the column are DAX and M language see below both options.
DAX Calculated column:
Minimum Date Dax =
CALCULATE (
MIN ( Dates_DAX[Date] );
FILTER ( Dates_DAX; Dates_DAX[ID] = EARLIER ( Dates_DAX[ID] ) )
)
M Language:
- On query editor select group by
- Group by ID
- Operation Min - Date
- Operation - All Rows
- Expande table values
See below result for both columns and attach PBIX file.
Regards,
MFelix