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.
Hello,
This should be simple. I have a column of values that are formatted as text that reads "201901", "201902", etc. I am trying to change their value to 2019-01, but when I change the format to date, the values are changed to completely random numbers.
Steps I've taken.
-edit query
-add column: Year-Month= Format(Volume[calendar year month], "YYYY-MM")
Attached is the value returned.
Solved! Go to Solution.
Hi,
The first two rows will automatically appear. For the third row, you simply have to go to Add column > Custom column and add everything you see from Date.From
@Anonymous ,
You may use DAX below.
Year-Month = VAR d = DATE ( QUOTIENT ( Volume[calendar year month], 100 ), MOD ( Volume[calendar year month], 100 ), 1 ) RETURN FORMAT ( d, "YYYY-MM" )
@Anonymous ,
You may use DAX below.
Year-Month = VAR d = DATE ( QUOTIENT ( Volume[calendar year month], 100 ), MOD ( Volume[calendar year month], 100 ), 1 ) RETURN FORMAT ( d, "YYYY-MM" )
Hi,
The attached screenshot should say it all
Hope this helps.
Hi,
thanks for the help.
I tried entering this in query editor, but it didn't work. I'm brand new to power bi so this is probably on me.
would I enter this is custom column ?
Hi,
The first two rows will automatically appear. For the third row, you simply have to go to Add column > Custom column and add everything you see from Date.From
Hi @Anonymous
You can use the below DAX patern.
Column = FORMAT('Calendar'[yearWeekNo],"")
Or if you use Query Editor M code is
Number.ToText( your number column )
hope this helps
Mariusz
Hello,
Thanks for the help. I entered the measure above, then tried to change to Date formula and recieved #ERROR.
this is what I entered:
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |