Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
HI guys,
I have this table from my dataset having four columns
Brand Percent Goal From_date To_date
1 0.20 1/1/2022 1/4/2022
2 0.30 1/1/2022 1/2/2022
2 0.25 1/3/2022 1/4/2022
Code for generate table
#table(
{"Brand", "Percent Goal", "From_date","To_date"},
{
{1,0.20, #date(2022,1,1),#date(2022,1,4)},
{2,0.30, #date(2022,1,1),#date(2022,1,2)},
{2,0.25, #date(2022,1,3),#date(2022,1,4)}
}
)
How can I get this results in power query editor:
Brand Percent Goal Date
1 0.20 1/1/2022
1 0.20 1/2/2022
1 0.20 1/3/2022
1 0.20 1/4/2022
2 0.30 1/1/2022
2 0.30 1/2/2022
2 0.25 1/3/2022
2 0.25 1/4/2022
Code for desired output:
#table(
{"Brand", "Percent Goal", "Date"},
{
{1,0.20, #date(2022,1,1)},
{1,0.20, #date(2022,1,2)},
{1,0.20, #date(2022,1,3)},
{1,0.20, #date(2022,1,4)},
{2,0.30, #date(2022,1,1)},
{2,0.30, #date(2022,1,2)},
{2,0.25, #date(2022,1,3)},
{2,0.25, #date(2022,1,4)}
}
)
I'm sorry I don't know how to upload a sample
Thanks for your time
Solved! Go to Solution.
In Power Query, add a column similar to this:
{Number.From([StartDate])..Number.From([EndDate])}
Expand the List then change the type to date.
Good luck
I don't understand what you are telling me.
Have you tried adding the column?
Hi,
Is the Date in dd/mm/yyyy format or mm/dd/yyyy?
Hi,
In that case HotChilli's solution should work fine for you.
In Power Query, add a column similar to this:
{Number.From([StartDate])..Number.From([EndDate])}
Expand the List then change the type to date.
Good luck
Hi @HotChilli
I have two other colums in my table, brand and Percent Goal, and dates may repete depending on Brand.
Percent Goal may be different depending on date as well
Thanks
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 73 | |
| 50 | |
| 46 | |
| 44 |