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 I have date in test format "Q1-2020". can I do like this if it is"Q1-2020" date range = 01/01/2020 to 03/01/2020. If anyways I can change date Q1-2020 text in date format as coulumn in data. Please help
Solved! Go to Solution.
Hi @Anonymous
Since the Q1 has 3 month in it , you can't change the type of "Q1-2020" from text to Date format directly.
And you can build a calendar table as I replied before and build relationships between two table's column1.
Table:
Calendar Table:
Relationship:
Build a Slicer to see the Date range for "Q1-2020"
Result:
You can download the pbix file from this link: date in text to date format
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
I build a table like yours to have a test.
You may build a calendar table to achieve your goal.
Calendar =
VAR _MinYear =
MINX ( 'Table', 'Table'[Year] )
VAR _MaxYear =
MAXX ( 'Table', 'Table'[Year] )
RETURN
ADDCOLUMNS (
CALENDAR ( DATE ( _MinYear, 1, 1 ), DATE ( _MaxYear, 12, 31 ) ),
"QTR", QUARTER ( [Date] ),
"Year", YEAR ( [Date] ),
"Column1",
"Q" & ""
& COMBINEVALUES ( "-", QUARTER ( [Date] ), YEAR ( [Date] ) )
)
Result:
You can download the pbix file from this link: date in text to date format
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , refer my blog or video for this , if those can help
https://www.youtube.com/watch?v=Qt0TM-4H09U&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=5
Do you want a different text value in same row that shows "1/1/2020-3/31/2020"? Or you want to generate a table of dates over that range?
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi
thanx for understanding. Yes I want to generate column/table over the date range in date format
Hi @Anonymous
Since the Q1 has 3 month in it , you can't change the type of "Q1-2020" from text to Date format directly.
And you can build a calendar table as I replied before and build relationships between two table's column1.
Table:
Calendar Table:
Relationship:
Build a Slicer to see the Date range for "Q1-2020"
Result:
You can download the pbix file from this link: date in text to date format
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou
Hi @Anonymous
measure1 =
VAR year = RIGHT(Table[date in test format],4)
RETURN
SWITCH(LEFT(Table[date in test format],2),"Q1","01/01/"&[year]&" to 03/01/"&[year],
"Q2","04/01/"&[year]&" to 06/01/"&[year],
"Q3","07/01/"&[year]&" to 09/01/"&[year],
"Q4","10/01/"&[year]&" to 12/01/"&[year])
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
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 |
---|---|
103 | |
103 | |
87 | |
73 | |
67 |
User | Count |
---|---|
119 | |
111 | |
95 | |
79 | |
72 |