NiMbuS
NiMbuS

Reputation: 87

Failing if condition in Power BI

While I am trying to create a new measure, with condition, I am facing the below error. I am trying to create a dynamic line based on dates on my line graph. For my case, if Sheet[Date] matches to Test[Date] it should return me a value of 100.

enter image description here

But the error says that a single value for column 'Date' in table Sheet1 cannot be determined. I also tried to convert the date to week with Weeknum function. But the error still persists. Does it mean that I can not compare single values in IF condition

If there is a way to compare the dates, kindly guide me.

Upvotes: 0

Views: 136

Answers (1)

Alexis Olson
Alexis Olson

Reputation: 40204

Sheet[Date] and Test[Date] are columns, not single values.

You need to specify which single values from those columns to compare. For example, you could compare the maximal values of those columns (within the local filter context):

MAX ( Sheet[Date] ) = MAX ( Sheet[Date] )

Upvotes: 1

Related Questions