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

Hasonevalue or alternative solution

Hi Experts

i have the following formula which means to work ok, and sometime does not populate the correct result from the resulting table.

Is there a better way to re-write the formula to it returns back the result from the respectibve table based on filter selection.

so for  example if i select  Canada from the filter Country then look in the PMS_Complaints_Country table, the default is correct as shown below.

Tool Tip P Value = 
SWITCH( TRUE(),
       
    HASONEVALUE( PMS_COMPLAINT[MDR_REPORTING_REGION] ), MEDIAN( PMS_COMPLAINT_REGION[MannKendallYRegion]),
    HASONEVALUE( PMS_COMPLAINT[COUNTRY_ORIGIN_NM] ), MEDIAN( PMS_COMPLAINT_COUNTRY[MannKendallY] ),
    HASONEVALUE( PMS_COMPLAINT[MANUFACTURING_REGISTERED_SITE] ), MEDIAN( PMS_COMPLAINT_MANUFACTURING_SITE[MannKendallY]),
    HASONEVALUE( PMS_COMPLAINT[REPORT_REQUIRED]), MEDIAN( PMS_COMPLAINT_REPORT_REQUIRED[MannKendallY]),
    HASONEVALUE( PMS_COMPLAINT[REPORTED_FAILURE_MD_CD] ), MEDIAN( PMS_COMPLAINT_REPORTED_MODE[MannKendallY] ),
    MEDIAN( PMS_COMPLAINT[MannKendallY] )
) 
1 REPLY 1
TeigeGao
Solution Sage
Solution Sage

Hi @Anonymous ,

Could you please share your expected result? 

Best REgards,

Teige

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.