The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hey !
I would need help translating this which works well in Excel but not in Power Bi
I have a social security number ex 19791203 where I create a format so that I can calculate the age 1979-12-03
The formula in Excel is =DATE(LEFT(O47;4);EXTEXT(O47;5;2);EXTEXT(O47;7;2)
How do I turn this into a DAX formula?
Solved! Go to Solution.
Hi,
Please see the below picture and the attached pbix file.
I tried to create a sample pbix file like beow.
It is for creating a new column.
Convert to date CC =
VAR _year =
LEFT ( Data[Social security number], 4 )
VAR _month =
MID ( Data[Social security number], 5, 2 )
VAR _date =
RIGHT ( Data[Social security number], 2 )
RETURN
DATE ( _year, _month, _date )
Hi,
Please see the below picture and the attached pbix file.
I tried to create a sample pbix file like beow.
It is for creating a new column.
Convert to date CC =
VAR _year =
LEFT ( Data[Social security number], 4 )
VAR _month =
MID ( Data[Social security number], 5, 2 )
VAR _date =
RIGHT ( Data[Social security number], 2 )
RETURN
DATE ( _year, _month, _date )
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |