Forum Discussion

cornaSn's avatar
cornaSn
Regular Visitor
1 year ago
Solved

conditional formatting lost when USERELATIONSHIP ist used

I have a table with two important values and two connections to the data model. Since I need the second value in my table, I used the USERELATIONSHIP function. Some data in the table is conditionally formatted, but this formatting is partially lost when using a slicer. I assume the slicer is applied to the "main" value where the connection is always active.
Is there a workaround or a better solution than duplicating the entire table? 
Thanks for the help!

Best regards 🙂

  • I just came to an solution, I used for the processing quality also a measure with USERELATIONSHIP and then used coniditonal formatting, that solved the Problem. 


6 Replies

  • Please give use something to work with.  Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
    Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
    Please show the expected outcome based on the sample data you provided.

    Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

    • cornaSn's avatar
      cornaSn
      Regular Visitor

      The issue I'm facing is with the "processing quality" column, which has conditional formatting. Specifically, cells that indicate "on-time processing" have a green checkmark, while cells that indicate "SLA exceeded" have a red cross and a red background.

      However, when I filter by Sales Manager "Christian," I get all the data based on my helper column (the last column in the table). The problem is that the formatting disappears for all ZIP codes where the Creator ZIP does not belong to Christian. Since he is the Processor, the formatting should still be applied.

      Here is also a screenshot. 



      ps.: the second ZIP should be the processor ZIP.


      Unfortunatly i couldn't insert the tables in one message. 

      • cornaSn's avatar
        cornaSn
        Regular Visitor

        I just came to an solution, I used for the processing quality also a measure with USERELATIONSHIP and then used coniditonal formatting, that solved the Problem. 


  • Deku's avatar
    Deku
    Super User

    Are you using a measure for the formatting. Is the colour selected with selectedvalue() and userelationship results in a blank??

    • cornaSn's avatar
      cornaSn
      Regular Visitor

      The conditional formatting is done via rules, if it contains a certain word, then take the symbol X

  • cornaSn's avatar
    cornaSn
    Regular Visitor

    So this is my visual Table: (the last column is there due to the USERELATIONSHIP otherwise, the data would now show when I filter with Sales Manager from the second table. 

    Table 1: 

    IndexCreator ZIPDate of CreationProcessor ZIPProductProcessingqualityDate of processingCompleted onStatusZIP_Processor_Measure
    14567827.01.202545678ATimely processing27.01.202527.01.2025successfully completed1
    25678928.02.202556789BTimely processing28.02.202528.02.2025successfully completed1
    35555117.03.202519283BTimely processing17.03.202525.03.2025successfully completed1
    4392227.02.202537465ATimely processing27.02.2025 in process1
    5331322.01.202512349ATimely processing22.01.202522.01.2025not successfully completed1
    6337024.01.202512349ATimely processing27.01.202527.01.2025not successfully completed1
    74567820.02.202545678CSLA exceeded25.02.202525.02.2025not successfully completed1
    89876103.03.202598761BTimely processing03.03.202503.03.2025not successfully completed1
    92345916.01.202523459ASLA exceeded  open1
    108765112.02.202587651ASLA exceeded  open1
    112345918.02.202523459ASLA exceeded  open1
    122345919.03.202523459BSLA exceeded  open1



    Table 2: 

    ZIP CodeSales Manager
    12345Max
    23456Alex
    34567Cathy 
    45678Christian
    56789Christian
    19283Christian
    37465Christian
    12349Christian
    12349Christian
    45678Christian
    98761Christian
    23459Christian
    87651Christian
    23459Christian
    23459Christian
    55551Anthony





     

    The issue I'm facing is with the "processing quality" column, which has conditional formatting. Specifically, cells that indicate "on-time processing" have a green checkmark, while cells that indicate "SLA exceeded" have a red cross and a red background.

    However, when I filter by Sales Manager "Christian," I get all the data based on my helper column (the last column in the table). The problem is that the formatting disappears for all ZIP codes where the Creator ZIP does not belong to Christian. Since he is the Processor, the formatting should still be applied.
    Additionally, I used the USERELATIONSHIP function in the table to manage the relationship between the Creator ZIP and Processor ZIP.



    Here is also a screenshot of the issue. The conditional formatting should be applied to all of the data




    ps.: In the screenshot the second ZIP Code should be the Processor ZIP