I have a calendar table with the following columns
Date. . calperiod commperiodnumber
15/3/2018. 3. 3
30/3/2018. 3 4
This is linked to a transaction table on date=transdate with following columns
Transdate postdate
15/3/2018. 30//32018
30/3//2018. 15/3/2018
30/3/2018. 30/3/2018
I want to write this in Dax but unsure how to pull the commperiodnumber for postdate
If commperiodnumber(transdate) >= commperiodnumber(postdate) + 1 then commperiodnumber(transdate) - 1 = PeriodNo
Or
If commperiodnumber(transdate) < commperiodnumber(postdate) + 1 then commperiodnumber(transdate) = PeriodNo
Or
If commperiodnumber(transdate) < commperiodnumbet(postdate) then commperiodnumber(postdate) = PeriodNo
The result for the three transactions listed should be 4, 3, 4
Date. . calperiod commperiodnumber
15/3/2018. 3. 3
30/3/2018. 3 4
This is linked to a transaction table on date=transdate with following columns
Transdate postdate
15/3/2018. 30//32018
30/3//2018. 15/3/2018
30/3/2018. 30/3/2018
I want to write this in Dax but unsure how to pull the commperiodnumber for postdate
If commperiodnumber(transdate) >= commperiodnumber(postdate) + 1 then commperiodnumber(transdate) - 1 = PeriodNo
Or
If commperiodnumber(transdate) < commperiodnumber(postdate) + 1 then commperiodnumber(transdate) = PeriodNo
Or
If commperiodnumber(transdate) < commperiodnumbet(postdate) then commperiodnumber(postdate) = PeriodNo
The result for the three transactions listed should be 4, 3, 4