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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pszczulka1984
Frequent Visitor

Creating Data Tables with Dates and several records for one date

Hi Guys,

 

I have created a table with dates as per script below now I need to have each of the days listed lets say 5 times for each day with each date having channel A, B, C, D, E. How can I add this as at the minute each date shows only 1's and I didnt add the records yet, not sure how to achieve that.

 

 I will be very greatful for your support 🙂

 

ADDCOLUMNS (
    CALENDAR ( DATE ( 2019, 3, 1 ), DATE ( 2024, 2, 28 ) ),
    "Day", FORMAT ( [Date], "DDDD" ),
    "DayNum", WEEKDAY ( [Date], 2 ),
    "StartMonth",EOMONTH( [Date],-1)+1,
    "EndMonth",EOMONTH([Date],0),
    "MonthtStartDate&Weekday",EOMONTH( [Date],-1)+1&FORMAT ( [Date], "DDDD" )
 
Thank you,
 
Joanna
1 ACCEPTED SOLUTION

3 REPLIES 3
amitchandak
Super User
Super User

@pszczulka1984 , Not very clear , You can have time table

https://kohera.be/blog/power-bi/how-to-create-a-time-table-in-power-bi-in-a-few-simple-steps/

 

Join date with date and time with time

 

Time = [date time].time

date =[date time].date

 

Hello,

 

1st of all thank you very much for taking time to read my post.

 

What I am trying to achieve is as per table below. So each date will appear as many times as many channels I have.

DateChannel
1/01/2020A
1/01/2020B
1/01/2020C
2/01/2020A
2/01/2020B
2/01/2020C
3/01/2020A
3/01/2020B
3/01/2020C

 

Thank you in advance,

 

 

@pszczulka1984 , See if this can help

crossjoin

new table = crossjoin([Date],[Channel])

https://docs.microsoft.com/en-us/dax/crossjoin-function-dax

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.