Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi All,
I used the below DAX formula for the tenure calculation in PowerBI. But it gives wrong calculation for the Year.
For example someone who joined in 25 March 2019. Ideally it should be 3 Years and 10 Months. DAX formula gives 04 Years and 10 Months. Can someone help me correcting this formula?
Try
Tenure =
VAR EndingDate =
TODAY ()
VAR Mo =
MOD (
DATEDIFF (
'Active Headcount'[Continuous Service Sysco LABS (Internship/Contract/Permanent)],
EndingDate,
MONTH
),
12
)
VAR Yr =
QUOTIENT (
DATEDIFF (
'Active Headcount'[Continuous Service Sysco LABS (Internship/Contract/Permanent)],
EndingDate,
MONTH
),
12
)
VAR Tenure =
IF (
Yr > 0,
COMBINEVALUES ( " ", Yr, "Years", Mo, "Months" ),
COMBINEVALUES ( " ", Mo, "Months" )
)
RETURN
Tenure
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |