Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello everyone,
Currently I have this data source:
I want to alter it into the following:
Is there a way to achieve this in Power Query? If not, is it possible in BI using DAX?
Thank you.
Solved! Go to Solution.
Hi @primolee
please check out the function that I've written for it here: https://www.thebiccountant.com/2017/12/11/date-datesbetween-retrieve-dates-between-2-dates-power-bi-...
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @primolee ,
We can create a custom column in power query editor and expand it to rows to meet your requiremnet:
List.Dates([WeekStart],Duration.Days([WeekEnd]-[WeekStart])+1,#duration(1,0,0,0))
All the queries are here:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwtNQ31TdU0oExTYHMEDOlWB24pBlC0tAIJGuqFBsLAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [WeekStart = _t, WeekEnd = _t, #"week name" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"WeekStart", type date}, {"WeekEnd", type date}, {"week name", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Date", each List.Dates([WeekStart],Duration.Days([WeekEnd]-[WeekStart])+1,#duration(1,0,0,0))),
#"Expanded Date" = Table.ExpandListColumn(#"Added Custom", "Date")
in
#"Expanded Date"
Best regards,
Hi @primolee
please check out the function that I've written for it here: https://www.thebiccountant.com/2017/12/11/date-datesbetween-retrieve-dates-between-2-dates-power-bi-...
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hello both,
Thank you so much, both of you!
Both are the solutions to my question, it is super difficult for me to decide whose answer to accept.
Dong's solution is very simple, whereas ImkeF's solution gives more flexibility of display by different interval.
I will accept ImkeF's reply as solution, but again, both work perfectly.
Thank you both for taking the time to help, greatly appreciated!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.