<?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 First Column (Rows) Formatting in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2888626#M93705</link>
    <description>&lt;P&gt;how about adding a index column for the first field in the visual?&lt;/P&gt;
&lt;P&gt;then put the index in the first column, and add a new measure to show the real value with MAX&lt;/P&gt;
&lt;P&gt;then you can add conditional formatting on the new measure.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Nov 2022 08:32:41 GMT</pubDate>
    <dc:creator>wdx223_Daniel</dc:creator>
    <dc:date>2022-11-07T08:32:41Z</dc:date>
    <item>
      <title>Matrix First Column (Rows) Formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2888395#M93691</link>
      <description>&lt;P&gt;Good Day All, I have an issue with conditionally formatting&amp;nbsp;the first column (Rows) in a matrix. I know most posts/replies state that this cannot be done yet but I had a solution which I got on line in one of the forums but my laptop crashed and I lost the solution. All I&amp;nbsp; basically want is depending on the text value (font colour) in the first column (Rows) to be either Red or Black.&amp;nbsp; What I remember doing was creating a column or measure (cannot remember&amp;nbsp;which one) to specify the values and preferred colour. I then used the DAX function&amp;nbsp;Format to condition the column. This is the bit that I cannot remember how to do. Below is the formula is used for the colour preferences (either column or measure?):&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;Income Colour = &lt;/SPAN&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;tbl_Income_01&lt;/SPAN&gt;&lt;SPAN&gt;[Income Statement]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Gross Margin"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"#FF0000"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;tbl_Income_01&lt;/SPAN&gt;&lt;SPAN&gt;[Income Statement]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Gross Margin %"&lt;/SPAN&gt;&lt;SPAN&gt; , &lt;/SPAN&gt;&lt;SPAN&gt;"#FF0000"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;tbl_Income_01&lt;/SPAN&gt;&lt;SPAN&gt;[Income Statement]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"EBITDA"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"#FF0000"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;tbl_Income_01&lt;/SPAN&gt;&lt;SPAN&gt;[Income Statement]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"EBIT"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"#FF0000"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;tbl_Income_01&lt;/SPAN&gt;&lt;SPAN&gt;[Income Statement]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"EBIT %"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"#FF0000"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"#000000"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;I then used the formula for a measure:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;FontColour = FORMAT(tbl_Income_01[Income Statement], tbl_income_01'[Income Colour]) or&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ColumnColour = &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;FONT size="3"&gt;tbl_Income_01[Income Statement]&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;FONT size="3"&gt;tbl_income_01'[Income Colour]&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Neither of these 2 options work. I get the text for the column name on both options but not formatted to the font colours&amp;nbsp;I want. Don't know if a need a MAX/MIN aggragate type function&amp;nbsp;in the formula (it is a text column), I think I did use some funtion but cannot remember which one. I definitely had it working as per the above column/measure used as the format_string.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any assistance would be appreciated.&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Nov 2022 06:53:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2888395#M93691</guid>
      <dc:creator>BasilRudham</dc:creator>
      <dc:date>2022-11-07T06:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix First Column (Rows) Formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2888511#M93695</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;use Table Visual, right click the first column, select condition formatting&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 07:40:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2888511#M93695</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2022-11-07T07:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix First Column (Rows) Formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2888548#M93698</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;wdx223_Daniel, thanks for the response but I cannot use a table. I have to use the matrix due to the design of the data model. I have multiple columns sourced across two data tables. The Rows shell is populated from 1st table using the Income statement text column, the Columns shell is populated by text data from a different source and the Values shell is populated by a single column from the same data table as the statement column. Have tried a Table but it doesn't work for the layout that I need.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2888395#" target="_blank" rel="noopener"&gt;PREVIEW&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Nov 2022 08:03:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2888548#M93698</guid>
      <dc:creator>BasilRudham</dc:creator>
      <dc:date>2022-11-07T08:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix First Column (Rows) Formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2888626#M93705</link>
      <description>&lt;P&gt;how about adding a index column for the first field in the visual?&lt;/P&gt;
&lt;P&gt;then put the index in the first column, and add a new measure to show the real value with MAX&lt;/P&gt;
&lt;P&gt;then you can add conditional formatting on the new measure.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 08:32:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2888626#M93705</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2022-11-07T08:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix First Column (Rows) Formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2889179#M93731</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Hi&amp;nbsp;&lt;SPAN&gt;wdx223_Daniel, thanks for the 2nd suggestion. I do have a numerical index column that I can insert into the matrix as the first column. I unfortunately have no idea on how to then change the index column values to equal the Income Statement column values and then condition them accordingly. As far as I know you cannot insert a measure into the matrix Rows shell, so I would have to create another column first to get the index column value to equal the Income Statement values? Then create a measure to format this new column? Very confusing for a relative newbie to figure out how to do it.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 11:55:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2889179#M93731</guid>
      <dc:creator>BasilRudham</dc:creator>
      <dc:date>2022-11-07T11:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix First Column (Rows) Formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2891090#M93836</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="416674" data-lia-user-login="BasilRudham" class="lia-mention lia-mention-user"&gt;BasilRudham&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can create a dimension table as below using &lt;A href="https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-enter-data-directly-into-desktop" target="_self"&gt;Enter Data&lt;/A&gt; method, then &lt;A href="https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-create-and-manage-relationships#create-a-relationship-manually" target="_self"&gt;create relationship&lt;/A&gt; between this dimension table and the table which the index column exist in base on index field.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lastly, put the field [Income Statement] to replace the original index column on the matrix visual. And you can follow the official documentation to &lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting#color-based-on-a-calculation" target="_self"&gt;apply conditional formatting in your matrix visual&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the above one not working, could you please provide some&lt;STRONG&gt; sample data&lt;/STRONG&gt; in the table&lt;STRONG&gt;&amp;nbsp;'&lt;/STRONG&gt;&lt;STRONG&gt;tbl_Income_01'&amp;nbsp;&lt;/STRONG&gt;with&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with whole backend logic and special examples? Is&amp;nbsp;&lt;STRONG&gt;[Income Statement]&amp;nbsp;&lt;/STRONG&gt;a fact field or measure? And what the index column look like? Is it also from&amp;nbsp;the table&lt;STRONG&gt;&amp;nbsp;'&lt;/STRONG&gt;&lt;STRONG&gt;tbl_Income_01'&lt;/STRONG&gt;?&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;SPAN&gt;It is better&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;&lt;SPAN&gt;simplified&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;pbix file. You can refer the following link to upload the file to the community. Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FDesktop%2FHow-to-upload-PBI-in-Community%2Fm-p%2F1672886&amp;amp;data=04%7C01%7Cv-yiruan%40microsoft.com%7C4f580813734d4a8355b008da16f6e91a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637847547341062885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=YJvujige2YITXKbKED9JieQm5LBdf%2F3IYPM4ggdiijQ%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 06:10:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2891090#M93836</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-08T06:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix First Column (Rows) Formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2891382#M93857</link>
      <description>&lt;P&gt;can this help?&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 08:04:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2891382#M93857</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2022-11-08T08:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix First Column (Rows) Formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2891546#M93868</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Good Day yingyinr, thanks for the response. I have attached a picture of what I want the end result to look like. I can get the values formatted correctly but not the Rows column. A link to a sample is attached below. I hope this helps. Please also remember that I do not want the backround colour chnaged but the font colour.&lt;BR /&gt;&amp;nbsp;&lt;A title="Sample file " href="https://www.dropbox.com/s/n2kd2epglt0pc1a/Income%20Trial%2020221103.pbix?dl=0" target="_self"&gt;https://www.dropbox.com/s/n2kd2epglt0pc1a/Income%20Trial%2020221103.pbix?dl=0&lt;/A&gt;&amp;nbsp;&lt;/FONT&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 08:46:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2891546#M93868</guid>
      <dc:creator>BasilRudham</dc:creator>
      <dc:date>2022-11-08T08:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix First Column (Rows) Formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2891602#M93873</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Hi&amp;nbsp;&lt;SPAN&gt;wdx223_Daniel, not sure if it will help. I did try it but got the drilldowns on the matrix but no values displayed. Also, this changes the background colour&amp;nbsp;and I need the font colours to be formatted. In response to another reply above I inserted a picture of what I want (as close as possible) and a link to a sample file with what I have done so far. Perhaps this would provide more details of what I have available and what I am trying to process. One reason as to why I use a matrix instead of a table is that the column headers change every month.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 08:57:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-First-Column-Rows-Formatting/m-p/2891602#M93873</guid>
      <dc:creator>BasilRudham</dc:creator>
      <dc:date>2022-11-08T08:57:24Z</dc:date>
    </item>
  </channel>
</rss>

