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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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