Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Dear all,
I have 2 tables in 2 queries:
-1: Period table:
-2: Data table:
What I need is:
-Depends on the Columna "SimpleDateLogOff" in Table 2, Add a column in Table 2 that returns the value of the Column "period" of Table 1.
*Example: "SimpleDateLogOff" is 1/3/2022, which is between 12/12/2021 - 1/8/2022, hence should return "1" of "Periodo" column.
Many thanks in advance, appreciate it!
Solved! Go to Solution.
Found a way:
Add a custom column in Period Table using “List.Dates" function, to have all the dates between a period.
Then just merge 2 tables.
Hi, @javieezy ;
Or you could in power query. first list.dates the merge it.
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @javieezy ;
You could create a measure or column by dax.
Measure.
Measure = CALCULATE(MAX('Period'[Periodo]),FILTER('Period',MAX('Data'[SimpleDateLogoff]) in CALENDAR([Start],[Finish])))
Column.
Column = CALCULATE(MAX('Period'[Periodo]),FILTER('Period','Data'[SimpleDateLogoff] in CALENDAR([Start],[Finish])))
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Found a way:
Add a custom column in Period Table using “List.Dates" function, to have all the dates between a period.
Then just merge 2 tables.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.