Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All
I have Raw data below :-
Date
12/2/2020
20/12/2019
My excepted result :-
Year,motn,Date
2020,2,12/2/2020
2019.12.2019
Hoep some one can advise me.
Paul Yeo
@Paulyeo11 @Pragati11 @Anonymous @amitchandak
You Have to create a new column .
Write below formula
New Date = Format(table1[date], "YYYY.mm.dd")
This code is more efficiant and let you modify your date as per your requirement .
You will get the desired result .
Give kudos if is it work for you .
@Paulyeo11 Duplicate the date column (twice) in Power Query editor and transform to Year, Month no.. As Power Query supports 2 columns to merge at once, first merge would be on Year and Month no. and next merge will be of resultant column (year,monthno.) with Date.
Please mind the sequence you select the columns to merge.
year = right([column],4)
Month =
var _pos = search("/",[column],,0)
return
mid([column],_pos+1,2)
new date =
var _pos = search("/",[column],,0)
return
date(right([column],4), mid([column],_pos+1,2), left([column],_pos-1))
Hi Amit
I get error msg :-
Hi @Paulyeo11 ,
You can create new columns for YEAR and MONTH using DAX as follows:
yearCol = YEAR(tablename[Date])
monthCol = MONTH(tablename[Date])
Replace tablename[Date] in the above DAX expressions with your table name and date column name.
Thanks,
Pragati
Hi Miss , Can you share how to start DAX ?
Hi @Paulyeo11 ,
You don't have to start DAX. It's in Power BI only. Just see the GIF below on how you can create a dax calculation:
Check the following link to go through starting with DAX in Power BI:
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-quickstart-learn-dax-basics
Thanks,
Pragati
Hi Miss
Thank you for sharing the link . Now more lady start to like data visulisation. it use to be for man only.
Paul Yeo
@Paulyeo11 That statement would have been inappropriate back in 1960, and it is very inappropriate today. I think you want to apologize to @Pragati11 .
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |