Forum Discussion
create new table from begin date, end date, transactionuid
- 8 years ago
- I have not taken online courses however, I have watched quite a few videos on https://www.sqlbi.com/, read a lot on https://www.daxpatterns.com/ and of course https://msdn.microsoft.com/en-us/query-bi/dax/dax-function-reference
- I've used a technique in Power Query the Query Editor in Power BI which may help you get started.
Using List.Transform:
List.Transform({Number.From([BeginDate])..Number.From([EndDate])},each Date.From(_))Starting from a simple table in the Power Query Editor:
Add Column:
Expand the Custom Column:
Gets you:
Remove [BeginDate] & [EndDate] will get you to what I believe is your desired outcome (to start in you journey):
Thanks for the reply.
I think I may just be too big of a newb to understand how that helps me.
1) what are the best online classes for learning DAX and how it works in Power BI?
2) Going back to the most basic concept of my problem. How would I take a table of begin dates, end dates and Uids and create a new table that would have a column of dates and a column of UIDs where each UID is repeated for each date in the range between begin and end.
- I have not taken online courses however, I have watched quite a few videos on https://www.sqlbi.com/, read a lot on https://www.daxpatterns.com/ and of course https://msdn.microsoft.com/en-us/query-bi/dax/dax-function-reference
- I've used a technique in Power Query the Query Editor in Power BI which may help you get started.
Using List.Transform:
List.Transform({Number.From([BeginDate])..Number.From([EndDate])},each Date.From(_))
Starting from a simple table in the Power Query Editor:
Add Column:
Expand the Custom Column:
Gets you:
Remove [BeginDate] & [EndDate] will get you to what I believe is your desired outcome (to start in you journey):
- LindaK5 years agoFrequent Visitor
Hi Chris,
is there a way, how i can get these lines, but only on level year and month? I do not need lines on daily.
Thank you!- ChrisMendoza5 years agoResident Rockstar
LindaK - I suppose you could try
List.Transform({Number.From([BeginDate])..Number.From([EndDate])},each Date.Month(_)) or List.Transform({Number.From([BeginDate])..Number.From([EndDate])},each Date.Year(_))- LindaK5 years agoFrequent Visitor
Thank you for such a quick reply, I tried this Date.Year or Date. Moth but it ended in error.