Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Multiselect Slicer interaction with Doughnut chart

I have slicer with multi select option, japan, UK, Brazil, data is available only for Japan and datasource M, so if user select Japan and any other country, or all three countries at on go, it should show "Data available only for Japan" and if user select only Japan then only the data should show for japan based on the market distribution in doghnut chart. How to achieve this in Power BI. . We tried by keeping transaparent visual on top of it but the tooltips are not accessible in this scanario and we are looking for some permanent soultion to it. Below are the outputs we are getting as of now but this is wrong. we are expecting data should be blak or null when user select sin slicer as Japan and UK or Japan and Brazil or all 3 toghther It should show Data only for Japan. Also, We are expecting this should be a multiselection option.

 

Sample Chart in Power BI

 

Attaching Sample Data

MarketSourceProductSale
BrazilS  
BrazilS  
BrazilS  
BrazilR  
BrazilR  
BrazilR  
JapanMCompany1195.1
JapanMCompany1410.9
JapanMCompany1626.7
JapanMCompany1842.5
JapanMNon Company2058.3
JapanMNon Company2274.1
JapanMNon Company2489.9
UKR  
UKR  
UKR  
UKR  
UKR  
UKR  
UKS  
UKS  
UKS  
UKS  
UKS  

 

 

 

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous ,
    You can try the following steps
    Create two measures

    Text Measure = 
     IF(
        SELECTEDVALUE('Table'[Market]) <> "Japan",
        "Data available only for Japan",
        ""
     )
    Background Measure = 
    IF(
        SELECTEDVALUE('Table'[Market]) = "Japan",
        "#FFFFFF00",
        "#FFFFFF"
    )

    Create a card visualiization

    Go to Format Visual -> Turn of the Category lable

    Then go to General -> Effects, Cutom background color

    Cover your Donut chart with the formatted card and resize it to completely cover the Donut chart.

    Final output

     

    Best regards,
    Albert He


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

     

     

     

5 Replies

  • Hello Anonymous ,

     

    We can use custome meausre or custom column for the same or a tooltip. You know you have multiple ways to get his done. use the feasible solution. If you want multi select option in your slicer without CTRL+ then use the option inside slicer setting in slicer format option. 

     

    Let me know if it works?

     

    Regards,

    Sangamesh KS

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello @Sangamesh KS thanks for the suggestion however, we are actually our requirement is not for tooltip it is to show data only when user selects market as Japan but currently it is hsowing data for all other markets as well.

  • Anonymous I don't know whether I understood your question properly or not. But based on my understanding, create a Measure like below:

    Measure_ = IF(SELECTEDVALUE(MyTable[Market]) <> "Japan", "Show data only for Japan",SUM(MyTable[Sale]))

     

     

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Tahreem24 Thanks for the reply however we tried this approach and DAX as well but this is not working as the expected output.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,
    You can try the following steps
    Create two measures

    Text Measure = 
     IF(
        SELECTEDVALUE('Table'[Market]) <> "Japan",
        "Data available only for Japan",
        ""
     )
    Background Measure = 
    IF(
        SELECTEDVALUE('Table'[Market]) = "Japan",
        "#FFFFFF00",
        "#FFFFFF"
    )

    Create a card visualiization

    Go to Format Visual -> Turn of the Category lable

    Then go to General -> Effects, Cutom background color

    Cover your Donut chart with the formatted card and resize it to completely cover the Donut chart.

    Final output

     

    Best regards,
    Albert He


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly