Forum Discussion
Problem with SWITCH formula
Anonymous , the formula you may have try with filter CALCULATE(COUNT(DifferentTable[Col1]),filter(DifferentTable,DifferentTable[Col2]=RELATED(SameTable[Col1])))
If switch is ised in a measure you have use insure single value like in given example
Switch( True(),
Max(Table[column]) = "19/20-P13", [Overdue]
Max(Table[column]) = "20/21-P1" ,[Overdue]*0.9
Max(Table[column]) = "20/21-P2" ,[Overdue]*0.8
Max(Table[column]) = "20/21-P3" ,[Overdue]*0.7
Max(Table[column]) = "20/21-P4" ,[Overdue]*0.6
Max(Table[column]) = "20/21-P5" ,[Overdue]*0.5
Max(Table[column]) = "20/21-P6" ,[Overdue]*0.4
)
- Anonymous6 years agoNot applicable
Thanks but I get this error:
The column 'SameTable[Col1]' either doesn't exist or doesn't have a relationship to any table available in the current context.Any solution?
- amitchandak6 years agoSuper User
Anonymous , it will work from 1-M direction. So change filter Table and related column
Try like
CALCULATE(COUNT(DifferentTable[Col1]),filter(SameTable,SameTable[Col1]=RELATED(DifferentTable[Col2])))