Forum Discussion

symkly's avatar
symkly
New Member
1 year ago
Solved

filtering with unichar

I would like to create a measure to show when there is a filter: unichar funnel icon will turn red other wise green

unicharfilter =
SWITCH(
    TRUE(),
    SELECTEDVALUE(table[column] NOT BLANK),
    UNICHAR(FunnelCode) is red otherwise green)

  • Hi symkly 

     

    you can use SVG for this 

     

    use the following measure and replace it with your filtering column 

    FunnelColorIcon = 
    IF(
        ISFILTERED(Sales[Region]),
        "data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='red'%3E%3Cpath d='M6 8h36l-14 16v12l-8-6v-6L6 8z' /%3E%3C/svg%3E",
        "data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='green'%3E%3Cpath d='M6 8h36l-14 16v12l-8-6v-6L6 8z' /%3E%3C/svg%3E"
    )

     

    makesure to change data category to image URL of the newly created measure

     

    output should looks like this 

     

     

     

     

4 Replies

  • Hi symkly 

     

    you can use SVG for this 

     

    use the following measure and replace it with your filtering column 

    FunnelColorIcon = 
    IF(
        ISFILTERED(Sales[Region]),
        "data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='red'%3E%3Cpath d='M6 8h36l-14 16v12l-8-6v-6L6 8z' /%3E%3C/svg%3E",
        "data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='green'%3E%3Cpath d='M6 8h36l-14 16v12l-8-6v-6L6 8z' /%3E%3C/svg%3E"
    )

     

    makesure to change data category to image URL of the newly created measure

     

    output should looks like this 

     

     

     

     

  • v-menakakota's avatar
    v-menakakota
    Icon for Community Support rankCommunity Support

    Hi  symkly 
    Thanks for reaching out to the Microsoft fabric community forum. 

     

    I would also take a moment to thank kushanNa  , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster. 

    Best Regards, 
    Menaka. 
    Community Support Team.

    • v-menakakota's avatar
      v-menakakota
      Icon for Community Support rankCommunity Support

      Hi symkly ,

      May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster. 

       

      Thank you. 

      • v-menakakota's avatar
        v-menakakota
        Icon for Community Support rankCommunity Support

        Hi  symkly ,

        I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution so that other community members can find it easily. 

         
        Thank you.