Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Switch to Selected Value

Hi Experts How would you convert the following from using a Switch to Selected Value... VAR ReportingMeasure = SELECTEDVALUE(Reporting[Reporting]) VAR InorganicMeasure = SELECTEDVALUE(InOrganic[InOrganic]) VAR NSales = SWITCH( ReportingMeasure, "Reported", [NSvPY1% (Reported PY)],BLANK()) VAR NSales1 = SWITCH( ReportingMeasure, "NOE",[NSvPY3% (NOE @ PY Rate)], BLANK()) Return SWITCH(ReportingMeasure, "Reported", NSales, "NOE", NSales1, [% New Organic] ())
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi Anonymous ,

     

    Maybe you can try to use following measure formula if it suitable for your requirement:

    me =
    SWITCH (
        SELECTEDVALUE ( InOrganic[InOrganic] ),
        "Reported", IF (
            SELECTEDVALUE ( Reporting[Reporting] ) = "Reported",
            [NSvPY1% (Reported PY)]
        ),
        "NOE", IF ( SELECTEDVALUE ( Reporting[Reporting] ) = "NOE", [NSvPY3% (NOE @ PY Rate)] ),
        [% New Organic]
    )
    

    If above not help, share some sample data to help us clarify your requirement:

    How to Get Your Question Answered Quickly

     

    Regards,

    Xiaoxin Sheng

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Maybe you can try to use following measure formula if it suitable for your requirement:

    me =
    SWITCH (
        SELECTEDVALUE ( InOrganic[InOrganic] ),
        "Reported", IF (
            SELECTEDVALUE ( Reporting[Reporting] ) = "Reported",
            [NSvPY1% (Reported PY)]
        ),
        "NOE", IF ( SELECTEDVALUE ( Reporting[Reporting] ) = "NOE", [NSvPY3% (NOE @ PY Rate)] ),
        [% New Organic]
    )
    

    If above not help, share some sample data to help us clarify your requirement:

    How to Get Your Question Answered Quickly

     

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      Anonymous
      Not applicable
      Ex cellent feedback, thanks Sheng.