<?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: Apply same dynamic formatting method for a multitude of columns in table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2495566#M68821</link>
    <description>&lt;P&gt;Please clarify further&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 08:53:01 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-05-05T08:53:01Z</dc:date>
    <item>
      <title>Apply same dynamic formatting method for a multitude of columns in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2433708#M64895</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a well prepared source table listing down individual's monthly KPI performance.&amp;nbsp; The PBI report only need to show the source table.&amp;nbsp; After the source table is imported, the data looks like Table 1&amp;nbsp; and we need final look like Table 2.&amp;nbsp; As shown, for some of the KPIs, we need to show in % format.&amp;nbsp; &amp;nbsp;I have more than 80 columns (different year month) in source table and each column need to apply this formatting method.&amp;nbsp; Thinking of using calculation groups in tablur editor but all the columns are columns in source table (not measure, to make a measure for each column, it is labour-intensive).&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice how can I quickly apply same formatting on multiple columns?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Apr 2022 12:20:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2433708#M64895</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-03T12:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same dynamic formatting method for a multitude of columns in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2434108#M64924</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;The best approach is to unpivot the columns using power query. It is possible to unpivot the data using DAX but this will require to create a new table and hence duplicate&amp;nbsp;the data.&lt;BR /&gt;In power query editor select all the "Year Month" columns and select unpivot&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;Rename the columns inside the code as convenient&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;Add the value column as a measure - example:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;KPI Value = 
IF ( 
    SELECTEDVALUE ( Table1[KPI] ) IN { 2, 3 },
    FORMAT ( SELECTEDVALUE ( Table1[Value] ), "Percent" ),
    SELECTEDVALUE ( Table1[Value] )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Create your matrix: "KPI" on rows, "Year Month" on columns and the measure on values&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;Here is a sample file for your reference&amp;nbsp;&lt;A href="https://www.dropbox.com/t/EcbFqwYlnAqOF54F" target="_blank"&gt;https://www.dropbox.com/t/EcbFqwYlnAqOF54F&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 02:35:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2434108#M64924</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-04T02:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same dynamic formatting method for a multitude of columns in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2439261#M65240</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;This feature is not currently supported by Power BI.&lt;/P&gt;
&lt;P&gt;Please vote here:&amp;nbsp;&lt;A href="https://ideas.powerbi.com/ideas/idea/?ideaid=7ed65717-4dc5-44d2-955e-8d90293f21a5" target="_self"&gt;Select all columns / select more than one column for field and conditional formatting&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I have misunderstood your meaning, please provide more details and desired output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 01:38:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2439261#M65240</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-06T01:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same dynamic formatting method for a multitude of columns in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2495343#M68814</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp; Thanks for the solution, it works, however it is slow for my actual dataset&amp;nbsp; it takes close to half minute to refresh the matrix.&amp;nbsp; Any suggestion to speed up it.?&amp;nbsp; &amp;nbsp;my dax is :&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;mea = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;t&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'KPI_PERC_F'[KPI]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'TBL'[KPI]&lt;/SPAN&gt;&lt;SPAN&gt; ) &lt;/SPAN&gt;&lt;SPAN&gt;IN&lt;/SPAN&gt; &lt;SPAN&gt;t&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt; ( TBL&lt;/SPAN&gt;&lt;SPAN&gt;[Value]&lt;/SPAN&gt;&lt;SPAN&gt; ), &lt;/SPAN&gt;&lt;SPAN&gt;"0.0%"&lt;/SPAN&gt;&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;selectedvalue&lt;/SPAN&gt;&lt;SPAN&gt;(TBL&lt;/SPAN&gt;&lt;SPAN&gt;[Value]&lt;/SPAN&gt;&lt;SPAN&gt;) )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In 'KPI_PERC_F'[KPI], there are about 250 data.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 May 2022 07:53:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2495343#M68814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-05T07:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same dynamic formatting method for a multitude of columns in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2495427#M68817</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Could be related to the visual rather than the code. However you can use variables&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;MEA =
VAR PercentKPIs =
    VALUES ( 'KPI_PERC_F'[KPI] )
VAR SelectedKPI =
    SELECTEDVALUE ( 'TBL'[KPI] )
RETURN
    IF ( SelectedKPI IN PercentKPIs, FORMAT ( SelectedKPI, "0.0%" ), SelectedKPI )&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 May 2022 08:10:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2495427#M68817</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-05T08:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same dynamic formatting method for a multitude of columns in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2495510#M68819</link>
      <description>&lt;P&gt;Visual part it is less than 500ms on perforamnce analyzer. variables do help, the first variable does not impove the performance a lot but the second variable SelectedKPI on your code reduce the dax query time from 75 s to 16 s.&amp;nbsp; &amp;nbsp; &amp;nbsp;one further question: if user want to view selected column say (Mar in my table above) all in % form regardless of the row content. Any modification we can do?&amp;nbsp; &amp;nbsp;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 08:31:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2495510#M68819</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-05T08:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same dynamic formatting method for a multitude of columns in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2495566#M68821</link>
      <description>&lt;P&gt;Please clarify further&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 08:53:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2495566#M68821</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-05T08:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same dynamic formatting method for a multitude of columns in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2497574#M68952</link>
      <description>&lt;P&gt;I mean if we want data in selected column all in percentage format (for example 202202 and 202203 these two column, highlighted value to be shown in percentage), how can we modify the DAX. In short, the format varies with both rows and columns&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;</description>
      <pubDate>Fri, 06 May 2022 05:26:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2497574#M68952</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-06T05:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same dynamic formatting method for a multitude of columns in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2497629#M68953</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Here is the sample file updated as requested&amp;nbsp;&lt;A href="https://we.tl/t-lqNI1fBWg8" target="_blank"&gt;https://we.tl/t-lqNI1fBWg8&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;KPI Value = 
IF ( 
    SELECTEDVALUE ( Table1[KPI] ) IN { 2, 3 },
    FORMAT ( SELECTEDVALUE ( Table1[Value] ), "Percent" ),
    IF ( 
        SELECTEDVALUE ( Table1[Year Month] ) IN { "202202", "202203" },
        SELECTEDVALUE ( Table1[Value] ) &amp;amp; "%",
        SELECTEDVALUE ( Table1[Value] )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 05:48:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Apply-same-dynamic-formatting-method-for-a-multitude-of-columns/m-p/2497629#M68953</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-06T05:48:35Z</dc:date>
    </item>
  </channel>
</rss>

