Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
MianAhsan
Helper I
Helper I

Add Date column from 2023 till today() without any connection for Date columns with other tables

Hi everyone,

I'm trying to create/add a date column in a table that is already grouped by "Customer Name" and "Country" to get columns "Base" & "Run Time," as shown in the table below. I've already created a date table that is connected with all other tables, but the main table has limited date data, and that is why we are not able to get complete Week's information after performing the calculation. 

That is why I wanted to add a Date column here starting from 01.01.2023 till today(). 

Example data looks like this:

CustomerNameCountryBaseRunTime
Customer 1US4444352
Customer 2DE9595760
Customer 3DE6060480
Customer 4US130131040
Customer 5SR112112896
Customer 6US2222176
Customer 7US4949392
Customer 8US4848384
Customer 9US330332640
Customer 10US2222176
Customer 11DE3535280
Customer 12DE1313104
Customer 13DE1616128
Customer 14DE6363504

 

And I want to have results like that:

CustomerNameCountryBaseRunTimeDate
Customer 1US444435201.01.2023
Customer 2DE959576001.01.2023
Customer 3DE606048001.01.2023
Customer 4US13013104001.01.2023
Customer 5SR11211289601.01.2023
Customer 6US222217601.01.2023
Customer 7US494939201.01.2023
Customer 8US484838401.01.2023
Customer 9US33033264001.01.2023
Customer 10US222217601.01.2023
Customer 11DE353528001.01.2023
Customer 12DE131310401.01.2023
Customer 13DE161612801.01.2023
Customer 14DE636350401.01.2023
Customer 1US444435201.02.2023
Customer 2DE959576001.02.2023
Customer 3DE606048001.02.2023
...............

 

Can you please help me here? I'm not an expert on PBI.

Thanks.

Regards,

Mian 

@zenisekd , @amitchandak 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MianAhsan ,

I have created a simple sample, please refer to it to see if it helps you.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("hZC7DsIwDEV/BWXuED/ymoEfoOpUdeyIkHj8P4krR8QLyxnioxv7rqs7f17vx31/nsBNbpkrmAUU0G3Tj4D1+XKtKEGQoh8FUqEOGjgbgfULIC8Ez0Zp0fOtDQEP5hJHJWoKogCSEVK/pAiomEtyF7KAMo9CUYFkUSKMdlHw/9YA0D4oCND2Ab1SIO3DGL1TiILahzG4t06C0DK2Lw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CustomerName = _t, Country = _t, Base = _t, RunTime = _t]),
    #"Added Custom" = Table.AddColumn(Source, "Custom", each List.Transform({Number.From(#date(2023,1,1))..Number.From(Date.From(DateTime.LocalNow()))},Date.From)),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
    #"Expanded Custom"

vrongtiepmsft_0-1708567576921.pngvrongtiepmsft_1-1708567588829.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

View solution in original post

2 REPLIES 2
MianAhsan
Helper I
Helper I

Hi @Anonymous , thank you for your response. Actually, I want to add data for those weeks where there is no runtime data, and that is why I was planning to add the Date column. Thank you for your support.

Anonymous
Not applicable

Hi @MianAhsan ,

I have created a simple sample, please refer to it to see if it helps you.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("hZC7DsIwDEV/BWXuED/ymoEfoOpUdeyIkHj8P4krR8QLyxnioxv7rqs7f17vx31/nsBNbpkrmAUU0G3Tj4D1+XKtKEGQoh8FUqEOGjgbgfULIC8Ez0Zp0fOtDQEP5hJHJWoKogCSEVK/pAiomEtyF7KAMo9CUYFkUSKMdlHw/9YA0D4oCND2Ab1SIO3DGL1TiILahzG4t06C0DK2Lw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CustomerName = _t, Country = _t, Base = _t, RunTime = _t]),
    #"Added Custom" = Table.AddColumn(Source, "Custom", each List.Transform({Number.From(#date(2023,1,1))..Number.From(Date.From(DateTime.LocalNow()))},Date.From)),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
    #"Expanded Custom"

vrongtiepmsft_0-1708567576921.pngvrongtiepmsft_1-1708567588829.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.