Forum Discussion
Error when trying to display measure
- 9 years ago
Thanks Anonymous
That makes sense. It obviously wasn't the right approach. I've persisted in trying to fix it and seem to have got there with a nested IF function:
PhaseLogic =
if('Union'[SourceAppGroupPhase] = "1",
1,
if('Union'[DestinationAppGroupPhase] = "1",
1,
if('Union'[SourceAppGroupPhase] = "2",
2,
if('Union'[DestinationAppGroupPhase] = "2",
2,
if('Union'[SourceAppGroupPhase] = "3",
3,
if('Union'[DestinationAppGroupPhase] = "3",
3,
4)
)))))Not sure that's its an elegant solution exactly but it seems to be working :)
Thanks again for your response.
I can see why this errors, you are asking the measure to check if an entire column is less than another entire column. It probably works in the matrix because it is able to resolve when those columns are coming back as single values.
How do you want this to work when your visualization has a selection that will return multiple rows? How do you expect something like {1,2,2,1,3} < {2,1,3,2,1} to return a result?
My gut instinct is that "VALUES('Union'[SourceAppGroupPhase]) < values('Union'[DestinationAppGroupPhase])," needs review.
Thanks Anonymous
That makes sense. It obviously wasn't the right approach. I've persisted in trying to fix it and seem to have got there with a nested IF function:
PhaseLogic =
if('Union'[SourceAppGroupPhase] = "1",
1,
if('Union'[DestinationAppGroupPhase] = "1",
1,
if('Union'[SourceAppGroupPhase] = "2",
2,
if('Union'[DestinationAppGroupPhase] = "2",
2,
if('Union'[SourceAppGroupPhase] = "3",
3,
if('Union'[DestinationAppGroupPhase] = "3",
3,
4)
)))))
Not sure that's its an elegant solution exactly but it seems to be working :)
Thanks again for your response.