Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
I have a dataset which has the join date of an individual. "Position From Date" and "Position To Date".
My code is currently grouping by:
Employee Summary By Anniversary = GROUPBY(
'ORDINARY HOURS',
'ORDINARY HOURS'[Employee_ID],
'ORDINARY HOURS'[Employee Name],
'ORDINARY HOURS'[Dim_Employee_Position.Anniversary date],
'ORDINARY HOURS'[Level],
"From Date", MINX(
CURRENTGROUP(),
'ORDINARY HOURS'[Calculation Date]
),
"To Date", MAXX(
CURRENTGROUP(),
'ORDINARY HOURS'[Calculation Date]
),
"Actual Pay", SUMX(
CURRENTGROUP(),
'ORDINARY HOURS'[Payroll.Gross Pay]
),
"Calculated Pay", SUMX(
CURRENTGROUP(),
'Ordinary Hours'[CalculatedPay]
)
)
I want to Group by the anniversary of "Position From Date" every year
Example: From 1/7/2012- 27/6/2013 "Calculation Date" column and 28/6/2013 to 27/6/2014 and so forth
How would I translate this logic to DAX?
Please find the example dataset here
Expected Table:
Employee Name | Position From Date | From Date | To Date | Calculated Pay | Actual Pay |
Randy | 28/06/2010 | 1/07/2010 | 27/06/2010 | $$ | $$ |
Randy | 28/06/2011 | 28/06/2011 | 27/06/2012 | $$ | $$ |
Randy | 28/06/2012 | 28/06/2012 | 27/06/2013 | $$ | $$ |
Randy | 28/06/2013 | 28/06/2013 | 27/06/2014 | $$ | $$ |
Randy | 28/06/2014 | 28/06/2014 | 27/06/2015 | $$ | $$ |
Hi @harshad_barge ,
I downloaded the file and find that it is a zip file filled with xml files. I tried to import file but nothing success. Is it the right dataset?
I have found the file in question; sorry for the gap.
Please find the file here:
https://filebin.net/agi6ojcr4qduve8x/Example.zip?t=3geojdh4
Thanks,
Harshad
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
107 | |
68 | |
48 | |
44 | |
43 |