The FILTER function returns a table, and the IF doesn't know how to work against an entire table (the multiple columns error).
Are you essentially trying to do this?
Item | Color | NewColumn
1 Red 50
2 Red 50
3 Blue 100
If this is the case, you can simple do:
NewColumn = IF( [Color] = "Red", 50, 100 )
When you are creating a calculated column, it is calculating the value of the cell within a row context. This means that when it's calculating the value for NewColumn in Row 1 (from the example above), it knows about the [Item] and [Color] column.
Thanks for replying the solution you mentioned below did not work. Since Color is a column in my data model it does not show up untill table name is specified and that will work only when I am trying to put a function ahead of it that is either SUM or something like that.
@Sarpotdary Thanks for the info. I'll need to know a little more about your table structure. What table is the Color column in, where are you trying to add this 'NewColumn', and how do these tables relate together?
@malagari I just have one single table which is having this column called as Color. The data is for 2017 however I need to create 5 charts for 2013 to 2016 where 2017 would take the data from the table itself when I put it into a stacked bar chart. However for rest of the years I need to put a measure which will show the stacked bar chart with the bar being split into two parts 50 for Red and 100 for Green (considering I only have two values in color column, Red and Green). My intention of writting a DAX was to have "fake" values but still splitting them by Red and Green values from Color column.