Forum Discussion
Showing current and future months
- 6 years ago
Hi Anonymous ,
Has your problem been solved? If not, please show us a sample data.
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Alright,
This was way more complicated than i thought. You will need a Financial Year column together with your period column. I have a table reference below the dax:
Calculated column =
VAR Cm = MONTH(today())
VAR Cy = YEAR(today())
VAR Fp = IF(Cm > 6 ; Cm -6 ; Cm +6)
VAR Fy = IF(Cm > 6 ; Cy ; Cy -1)
VAR Ep = IF(Fp > 6 ; Fp -6 ; Fp +6)
VAR Ey = IF(Fp > 6 ; Fy +1 ; Fy)
Return
IF(
OR(
AND([PERIOD] >= Fp ; [Financial Year] = Fy) ;
AND([PERIOD] <= Ep ; [Financial Year] = Ey)
) ;
1 ;
0 )
| Year | Month | Financial period | Financial Year |
| 2020 | 1 | 7 | 2019 |
| 2020 | 2 | 8 | 2019 |
| 2020 | 3 | 9 | 2019 |
| 2020 | 4 | 10 | 2019 |
| 2020 | 5 | 11 | 2019 |
| 2020 | 6 | 12 | 2019 |
| 2020 | 7 | 1 | 2020 |
| 2020 | 8 | 2 | 2020 |
| 2020 | 9 | 3 | 2020 |
| 2020 | 10 | 4 | 2020 |
| 2020 | 11 | 5 | 2020 |
| 2020 | 12 | 6 | 2020 |
Hi
That is very close but missed the periods 10,11,12 which are April, May, Jun
I tracked the problem to the If statement
Current period 4
FP =10
FY = 2019
EP = 4
EY = 2020
First clause of the if statement would be incorrect as it would default to 2019
I am trying to now resolve the IF statement component
The data set has 2 years of data in it 2019, 2020
Regards
Skinni
- tex6286 years ago
Community Champion
Anonymous ,
Is this not the desired interval?
If not, could you make an excel table in the same way and show me what you're after?
Br,
J