Forum Discussion

agraffeo21's avatar
agraffeo21
Helper I
10 years ago

Default labeling

I would like to make the default in the matrix to the U.S., but every time I try to form an interaction, it lists all of the countries. I never want it to list any country -- I want to be able to click on a country, and have the matrix show that one country. Then when I click on the globe, I want the matrix to show the US average -- not a list. Please help.

 

Thanks.

 

3 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    agraffeo21

     

    Please see a workaround with two measures as below.

    AVG Measure =
    IF (
        HASONEVALUE ( Table1[country] ),
        AVERAGE ( Table1[pcis] ),
        AVERAGEX ( FILTER ( Table1, Table1[country] = "USA" ), Table1[pcis] )
    )
    Country measure =
    IF (
        HASONEVALUE ( Table1[country] ),
        LASTNONBLANK ( Table1[country], 0 ),
        "USA"
    )

     

    Please accept it as solution if it answers your question. For any other questions, feel free to let me know.

    • agraffeo21's avatar
      agraffeo21
      Helper I

      Eric_Zhang thank you for the response.

       

      I tried the solution multiple times but keep getting "couldn't load the data for this visual." do I need to make any relationships with the data in the graph? Should my "country" column be the same one as the "country" column linked to the graph?

       

      Here is a screenshot of the error.

       

      Thank you.

       

      • Eric_Zhang's avatar
        Eric_Zhang
        Microsoft Employee

        agraffeo21

         

        What are the measures' expressions like in your case? Make sure "HASONEVALUE ( Table1[country] )" has the same country column with country in the filled map visual.