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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
prashantg364
Helper II
Helper II

DAX query

I have a product code table as shown below

Product code
alpha
beta
gama

x

Now I want to add a date column against each product for a specific duration, as example shown below

Product codeDate
alpha01-Mar-23
alpha02-Mar-23
alpha03-Mar-23
alpha04-Mar-23
alpha05-Mar-23
beta01-Mar-23
beta02-Mar-23
beta03-Mar-23
beta04-Mar-23
beta05-Mar-23
gama01-Mar-23
gama02-Mar-23
gama03-Mar-23
gama04-Mar-23
gama05-Mar-23


Pls help me on creating a column.

4 REPLIES 4
wdx223_Daniel
Super User
Super User

NewTable=GENERATE(VALUES(Table[Product Code]),CALENDAR(DATE(2023,3,1),DATE(2023,3,5)))

Resolved by creating a custom column in query editor. Thanks

Thanks, it works.

aditya0125
Resolver I
Resolver I

Create date column manually in Query editor.
Get data-select Blank Query-type= {Number.From(#date(2023,1,1))..Number.From(#date(2023,3,15))}
and covert the ABC123 type to date.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.