Forum Discussion
Vijay08V
Helper III
2 years agoNeed DAX Help for calculated column
Hi, I have a similar table as below and I'm trying to introduce a calculated column which evaluates at row level and gives me the FTE count. The logic that I'm trying to put is when I have Revise...
- Anonymous2 years ago
Hi Vijay08V ,
You can try the following dax.
Expected output123 = var _column= SELECTCOLUMNS(FILTER(ALL('Table'),'Table'[Tab Name ]=EARLIER('Table'[Tab Name ])&&'Table'[Table Name]=EARLIER('Table'[Table Name])&&'Table'[Date]=EARLIER('Table'[Date])&&'Table'[Value]=0),"test",[Metrics]) RETURN SWITCH( TRUE(), NOT("Revised FTE") in _column && NOT("Locked FTE") in _column && NOT("Planned FTE") in _column&&'Table'[Metrics]="Revised FTE",[Value], "Revised FTE" in _column && NOT("Locked FTE") in _column && NOT("Planned FTE") in _column&&'Table'[Metrics]="Locked FTE",[Value], "Revised FTE" in _column && "Locked FTE" in _column && NOT("Planned FTE") in _column&&'Table'[Metrics]="Planned FTE",[Value], NOT("Revised FTE") in _column && "Locked FTE" in _column && NOT("Planned FTE") in _column&&'Table'[Metrics]="Revised FTE",[Value])Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi Vijay08V ,
You can try the following dax.
Expected output123 =
var _column=
SELECTCOLUMNS(FILTER(ALL('Table'),'Table'[Tab Name ]=EARLIER('Table'[Tab Name ])&&'Table'[Table Name]=EARLIER('Table'[Table Name])&&'Table'[Date]=EARLIER('Table'[Date])&&'Table'[Value]=0),"test",[Metrics])
RETURN
SWITCH(
TRUE(),
NOT("Revised FTE") in _column && NOT("Locked FTE") in _column && NOT("Planned FTE") in _column&&'Table'[Metrics]="Revised FTE",[Value],
"Revised FTE" in _column && NOT("Locked FTE") in _column && NOT("Planned FTE") in _column&&'Table'[Metrics]="Locked FTE",[Value],
"Revised FTE" in _column && "Locked FTE" in _column && NOT("Planned FTE") in _column&&'Table'[Metrics]="Planned FTE",[Value],
NOT("Revised FTE") in _column && "Locked FTE" in _column && NOT("Planned FTE") in _column&&'Table'[Metrics]="Revised FTE",[Value])
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.