Forum Discussion

LairdLight's avatar
LairdLight
Frequent Visitor
9 years ago
Solved

Error when trying to display measure

I'm having issues with a measure that I created. It will display correctly in a matrix visual but if I try to display it in any other visual I get the error: "MdxScript(Model) (5, 3) Calculation err...
  • LairdLight's avatar
    LairdLight
    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.