Forum Discussion
EFont
3 years agoNew Member
Logical clause for a join ?
Hello ! I would like to get a list of active years per users, based on the years between their start and end dates. My Issue is that I do not have the possibility to add Stored Procedures on my ...
- 3 years ago
Roughly speaking, use GENERATEALL(vwUsers, FILTER(vwYears, ...)) to realize LEFT JOIN effect.
CNENFRNL
3 years agoCommunity Champion
Roughly speaking, use GENERATEALL(vwUsers, FILTER(vwYears, ...)) to realize LEFT JOIN effect.
- EFont3 years agoNew Member
Indeed !!!
I played a bit with GenerateAll
Once I understood its power, I managed to do it from my sample's elements
The next step was to apply it to my solution and it works !
I also made a groupby on my calendar table to get only the years to simplify the results into a ctYears table, here is the resulting code
ctUserActivityAndYear = GENERATEALL(ctUserActivity,filter(ctYears,and(ctYears[Year] >= ctUserActivity[DateStarted].[Year], ctYears[Year] <= ctUserActivity[DateEnded].[Year])))Here is the resulting table
CNENFRNL, I thank you very much !
Have an excellent weekend !