Forum Discussion
msommerf
Helper III
6 years agoDate Slicer - Custom Phases
Hi, I have a date table which defines the phases of a project every year as follows: Phase 1 = 1st January - 31st July Phase 2 = 1st August - 31st December I have created a column in my dat...
- 6 years ago
HI msommerf
Ok, try this way:
previous phase = var _current= CALCULATE(MAX(Dates[Phase Year]),FILTER(Dates,Dates[Phase Selection]="Current Phase")) return IF(IF(RIGHT(_current,1)="2",LEFT(_current,4)&" Phase 1",VALUE(LEFT(_current,4))-1&" Phase 2")=Dates[Phase Year],"Previous Phase",Dates[Phase Year])Regards,
Lin
v-lili6-msft
Community Support
6 years agoHI msommerf
Ok, try this way:
previous phase =
var _current= CALCULATE(MAX(Dates[Phase Year]),FILTER(Dates,Dates[Phase Selection]="Current Phase")) return
IF(IF(RIGHT(_current,1)="2",LEFT(_current,4)&" Phase 1",VALUE(LEFT(_current,4))-1&" Phase 2")=Dates[Phase Year],"Previous Phase",Dates[Phase Year])
Regards,
Lin
msommerf
Helper III
6 years ago