<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: matrix conditional formatting on % average of values based on average total in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2215350#M52418</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226136" data-lia-user-login="Peter_Verweij" class="lia-mention lia-mention-user"&gt;Peter_Verweij&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Could you please share your &lt;STRONG&gt;simple sample pbix file&lt;/STRONG&gt; with me in order to make troubleshooting? Later I will check it and provide you a suitable solution. Thank you.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 05:03:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-12-01T05:03:15Z</dc:date>
    <item>
      <title>matrix conditional formatting on % average of values based on average total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2192556#M51285</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got a problem fixing conditional formating based the values based on de total&lt;/P&gt;&lt;P&gt;Searching for an answer on the community site i did not accomplish my goal.&lt;/P&gt;&lt;P&gt;My goal is to conditional format the values based on the total. Just like the example below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below the average = Red&lt;/P&gt;&lt;P&gt;Same as average = Orange&lt;/P&gt;&lt;P&gt;Above average = Green&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards, Peter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 13:59:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2192556#M51285</guid>
      <dc:creator>Peter_Verweij</dc:creator>
      <dc:date>2021-11-16T13:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: matrix conditional formatting on % average of values based on average total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2192660#M51289</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226136" data-lia-user-login="Peter_Verweij" class="lia-mention lia-mention-user"&gt;Peter_Verweij&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes, that's possible with a measure for the conditional formatting.&lt;/P&gt;
&lt;P&gt;Create a measure that will compare the current value vs. the Average. When it's above, the color should be green, when equal orange and below red. Then you can use the measure as formatting option:&lt;BR /&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting#color-based-on-a-calculation" target="_blank"&gt;Conditional table formatting in Power BI Desktop - Power BI | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;If you need any help please let me know.&lt;/DIV&gt;
&lt;DIV&gt;If I answered your question I would be happy if you could mark my post as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; and give it a thumbs up &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Best regards&lt;/DIV&gt;
&lt;DIV&gt;Denis&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Blog: &lt;A title="Click here!" href="https://whatthefact.bi/?utm_source=powerbicommunity&amp;amp;utm_medium=link&amp;amp;utm_campaign=forum" target="_blank" rel="noopener"&gt;&lt;U&gt;WhatTheFact.bi&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;Follow me: &lt;A title="Click here!" href="https://twitter.com/DenSelimovic" target="_blank" rel="noopener"&gt;&lt;U&gt;twitter.com/DenSelimovic&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 16 Nov 2021 14:46:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2192660#M51289</guid>
      <dc:creator>selimovd</dc:creator>
      <dc:date>2021-11-16T14:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: matrix conditional formatting on % average of values based on average total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2198215#M51536</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226136" data-lia-user-login="Peter_Verweij" class="lia-mention lia-mention-user"&gt;Peter_Verweij&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created a sample pbix file(see attachment) for you, please check whether that is what you want.&lt;/P&gt;
&lt;P&gt;1. Create a &lt;STRONG&gt;measure&lt;/STRONG&gt; as below to set the color base on different conditions&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Conditional formatting = 
VAR _selcontractor =
    SELECTEDVALUE ( 'Table'[Contractor] )
VAR _invoice =
    AVERAGEX (
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Contractor] = _selcontractor ),
        [Invoice]
    )
VAR _payed =
    AVERAGEX (
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Contractor] = _selcontractor ),
        [Payed]
    )
VAR _avgofper =
    DIVIDE ( _payed, _invoice, 0 )
RETURN
    IF (
        [Percent of Invoice and Payed] &amp;lt; _avgofper,
        "Red",
        IF ( [Percent of Invoice and Payed] = _avgofper, "Orange", "Green" )
    )&lt;/LI-CODE&gt;
&lt;P&gt;2. Configure conditional formatting: set the backgroud color for the &lt;STRONG&gt;Values&lt;/STRONG&gt; field: Percent just as below screenshot&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 08:50:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2198215#M51536</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-19T08:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: matrix conditional formatting on % average of values based on average total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2201319#M51684</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;I've used your sample in my file, but i am experising some troubles with the correct % of&amp;nbsp;&amp;nbsp;Conditional formatting measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i hope you can help me.&lt;/P&gt;&lt;P&gt;If i use the VAR _avgofper (the first matrix in the picture) with this in the return section for troubleshooting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then i see that the average is higher than expected. What i am experiencing is that the&amp;nbsp;_avgofper is not affected by the selections. When im searching the 79% of th efirst row in my excel file, i can not find it if i divide the payed and invoiced for the periodes 202101 till 202109.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure used in the coloured matrix is correct:&amp;nbsp;&lt;SPAN&gt;Percent of Invoice and Payed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an option to put the year and the period in the allselected code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 11:05:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2201319#M51684</guid>
      <dc:creator>Peter_Verweij</dc:creator>
      <dc:date>2021-11-22T11:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: matrix conditional formatting on % average of values based on average total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2215350#M52418</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226136" data-lia-user-login="Peter_Verweij" class="lia-mention lia-mention-user"&gt;Peter_Verweij&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Could you please share your &lt;STRONG&gt;simple sample pbix file&lt;/STRONG&gt; with me in order to make troubleshooting? Later I will check it and provide you a suitable solution. Thank you.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 05:03:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2215350#M52418</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-01T05:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: matrix conditional formatting on % average of values based on average total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2216013#M52459</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to make a simple file of the real one. it has 3 pages. i am looking for the same calculation method for these 3 pages.&amp;nbsp;i've translated the pages into english.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i cannot understand is the calculation of power bi versus excel on page:&amp;nbsp;utilization per Product&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am looking for the excel % in the power bi calculation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also the percentages that are the same = are red or green.&lt;/P&gt;&lt;P&gt;probebly due to the decimals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The file is here:&amp;nbsp;&lt;A href="https://www.dropbox.com/s/xhco6u5s8qft6os/Conditional%20formatting.pbix?dl=0" target="_blank"&gt;https://www.dropbox.com/s/xhco6u5s8qft6os/Conditional%20formatting.pbix?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for helping me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards, Peter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 11:11:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2216013#M52459</guid>
      <dc:creator>Peter_Verweij</dc:creator>
      <dc:date>2021-12-01T11:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: matrix conditional formatting on % average of values based on average total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2219180#M52615</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226136" data-lia-user-login="Peter_Verweij" class="lia-mention lia-mention-user"&gt;Peter_Verweij&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I updated your sample pbix file(&lt;EM&gt;&lt;STRONG&gt;see attachment&lt;/STRONG&gt;&lt;/EM&gt;), please check whether that is what you want.&lt;/P&gt;
&lt;P&gt;1. Create a &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;calculated column&lt;/STRONG&gt;&lt;/FONT&gt; as below to get the percentage of payed vs invoiced per row&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Percent of payed and invoice = DIVIDE('FactTable'[Payed],'FactTable'[Invoice],0)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Update the formula of measure &lt;STRONG&gt;[utilization]&lt;/STRONG&gt; as below&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;utilization = AVERAGEX('FactTable','FactTable'[Percent of payed and invoice])&lt;/LI-CODE&gt;
&lt;P&gt;3. Update the formula of measure&lt;STRONG&gt; [&lt;SPAN style="font-family: inherit;"&gt;Conditional formatting&lt;/SPAN&gt;]&amp;nbsp;&lt;/STRONG&gt;as below&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt; I found that the fact table contains the period of 201913 and 202013, but there is no such period in the calendar table, so I excluded the period of 201913 and 202013 to calculate the percentage...&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 03:07:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2219180#M52615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-03T03:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: matrix conditional formatting on % average of values based on average total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2222407#M52800</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;Thank you for your assistence!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 08:50:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/matrix-conditional-formatting-on-average-of-values-based-on/m-p/2222407#M52800</guid>
      <dc:creator>Peter_Verweij</dc:creator>
      <dc:date>2021-12-06T08:50:26Z</dc:date>
    </item>
  </channel>
</rss>

