Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I am newbiee to PowerBI and trying to convert year quarter 1Q06 format to either date format (03/30/2006) or 2006 Q1 format by using power query.
Solved! Go to Solution.
Hi @Anonymous,
to format from 1Q06 to 2016 Q1 use:
let
Source = "1Q06",
QuarterNr = Text.BeforeDelimiter(Source, "Q"),
Year = "20" & Text.AfterDelimiter(Source, "Q"),
NewFormat = Year & " Q" & QuarterNr
in
NewFormatAnd to convert from 1Q06 to the last day of a quarter use:
let
Source = "1Q06",
QuarterNr = Number.FromText(Text.BeforeDelimiter(Source, "Q")),
Year = Number.FromText("20" & Text.AfterDelimiter(Source, "Q")),
StartOfYear = #date(Year, 1, 1),
EndOfQuarter = Date.AddDays(Date.AddQuarters(StartOfYear, QuarterNr), -1)
in
EndOfQuarter
Hi @Anonymous,
to format from 1Q06 to 2016 Q1 use:
let
Source = "1Q06",
QuarterNr = Text.BeforeDelimiter(Source, "Q"),
Year = "20" & Text.AfterDelimiter(Source, "Q"),
NewFormat = Year & " Q" & QuarterNr
in
NewFormatAnd to convert from 1Q06 to the last day of a quarter use:
let
Source = "1Q06",
QuarterNr = Number.FromText(Text.BeforeDelimiter(Source, "Q")),
Year = Number.FromText("20" & Text.AfterDelimiter(Source, "Q")),
StartOfYear = #date(Year, 1, 1),
EndOfQuarter = Date.AddDays(Date.AddQuarters(StartOfYear, QuarterNr), -1)
in
EndOfQuarter
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 7 | |
| 6 |