Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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] ())
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Ex cellent feedback, thanks Sheng.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.