Forum Discussion
henrys1995
2 years agoRegular Visitor
Difference in Months - Columns
Hi all, How can Power Query give the below required output: Source Data: Employee ID Employee Name Start Date End Date 2321 ...
- 2 years ago
Hi henrys1995 - yes, absolutely. You can modify this part of the script to customize the format of the date.
Joe_Barry
2 years agoSolution Sage
Hi henrys1995
Is the required out what you want to visualise after loading the data? If so try this.
Leave the data as it is and load it in. Are you using a Date Dimension Table? Then Try this
Hope it helps
Joe
Employee RT =
VAR _MaxDate = MAX('Date'[Date])
RETURN
CALCULATE(
DISTINCTCOUNT('Table'[Employee ID]),
KEEPFILTERS('Table'[Start Date] <= _MaxDate
&& 'Table'[End Date] > _MaxDate),
ALL('Date'))