<?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 Use dynamic column names in calculation groups in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Use-dynamic-column-names-in-calculation-groups/m-p/3994161#M53434</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using calculation groups to show a matrix visual that contains measures on both axes, i.e., on rows &amp;amp; columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="2"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;TodaysValue&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;YesterdaysValue&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;DayBeforeYesterdayvalue&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;MTD for Curr Month&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total Sales&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total Profit&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created Total Sales and Total Profit measures that calculate the sales and profit, and I have also created Todays Value, Yesterdays Value, and DayBefore Yesterday Value measures to put them in calculation items in the calculation group so that when I put the calculation group on the columns, it should calculate the Total Sales or Total Profit for that particular day/period in the value fields.&lt;BR /&gt;&lt;BR /&gt;I am trying to get the measure names shown on column headers dynamically so that TodaysValue can be replaced with today's date, YesterdaysValue can be replaced with yesterday's date,&amp;nbsp;DayBeforeYesterdayvalue can be replaced with the day before yesterday's date, and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming today's date is January 10, the expected output is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;1&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;0-Jan&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;09-Jan&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;08-Jan&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Jan (MTD)&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total Sales&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total Profit&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried various ways but was unable to achieve this. Can someone guide me on how to get the expected results?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/148838"&gt;@amitchandak&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/118660"&gt;@rajendraongole1&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/457209"&gt;@Ritaf1983&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jun 2024 06:39:02 GMT</pubDate>
    <dc:creator>N-msft</dc:creator>
    <dc:date>2024-06-15T06:39:02Z</dc:date>
    <item>
      <title>Use dynamic column names in calculation groups</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Use-dynamic-column-names-in-calculation-groups/m-p/3994161#M53434</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using calculation groups to show a matrix visual that contains measures on both axes, i.e., on rows &amp;amp; columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="2"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;TodaysValue&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;YesterdaysValue&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;DayBeforeYesterdayvalue&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;MTD for Curr Month&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total Sales&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total Profit&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created Total Sales and Total Profit measures that calculate the sales and profit, and I have also created Todays Value, Yesterdays Value, and DayBefore Yesterday Value measures to put them in calculation items in the calculation group so that when I put the calculation group on the columns, it should calculate the Total Sales or Total Profit for that particular day/period in the value fields.&lt;BR /&gt;&lt;BR /&gt;I am trying to get the measure names shown on column headers dynamically so that TodaysValue can be replaced with today's date, YesterdaysValue can be replaced with yesterday's date,&amp;nbsp;DayBeforeYesterdayvalue can be replaced with the day before yesterday's date, and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming today's date is January 10, the expected output is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;1&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;0-Jan&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;09-Jan&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;08-Jan&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Jan (MTD)&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total Sales&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total Profit&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried various ways but was unable to achieve this. Can someone guide me on how to get the expected results?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/148838"&gt;@amitchandak&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/118660"&gt;@rajendraongole1&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/457209"&gt;@Ritaf1983&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2024 06:39:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Use-dynamic-column-names-in-calculation-groups/m-p/3994161#M53434</guid>
      <dc:creator>N-msft</dc:creator>
      <dc:date>2024-06-15T06:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Use dynamic column names in calculation groups</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Use-dynamic-column-names-in-calculation-groups/m-p/3995504#M53450</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/593831"&gt;@N-msft&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_0-1718608476367.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1117652i5B0AB54EE85915A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_0-1718608476367.png" alt="vyangliumsft_0-1718608476367.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Are you considering using measure directly to display the data you want:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
var _day=TODAY()
var _lastday=TODAY()-2
return
IF(
    MAX('Table'[Date]) &amp;gt;= _lastday &amp;amp;&amp;amp;MAX('Table'[Date])&amp;lt;=_day,
    SUMX(
        'Table',[Value]),BLANK())&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_1-1718608476369.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1117653i0B6C4D08FF1AF57A/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyangliumsft_1-1718608476369.png" alt="vyangliumsft_1-1718608476369.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 07:15:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Use-dynamic-column-names-in-calculation-groups/m-p/3995504#M53450</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-17T07:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use dynamic column names in calculation groups</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Use-dynamic-column-names-in-calculation-groups/m-p/4028659#M53987</link>
      <description>&lt;P class="lia-indent-padding-left-30px"&gt;Thanks&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using multiple measures i.e. Total Sales, Total Profits, etc. on Rows of the matrix along with a calculation group with the following calculation items :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;TodaysValue&lt;/LI&gt;&lt;LI&gt;YesterdaysValue&lt;/LI&gt;&lt;LI&gt;DayBeforeYesterdayvalue&lt;/LI&gt;&lt;LI&gt;MTD for Curr Month&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am stuck at naming these calculation Items dynamically like -&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;TodaysValue should be Today's date.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;YesterdaysValue should be yesterday's date&lt;/LI&gt;&lt;LI&gt;DayBeforeYesterdayvalue should be day before yesterday's date&lt;/LI&gt;&lt;LI&gt;MTD for Curr Month should be "Current Month's Name".&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hope I am able to explain it now..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is the screesnhot as unable to upload .PBIX file.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1127933i9936EB0F826ED8BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot.png" alt="Screenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jul 2024 14:23:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Use-dynamic-column-names-in-calculation-groups/m-p/4028659#M53987</guid>
      <dc:creator>N-msft</dc:creator>
      <dc:date>2024-07-07T14:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Use dynamic column names in calculation groups</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Use-dynamic-column-names-in-calculation-groups/m-p/4028661#M53988</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/593831"&gt;@N-msft&lt;/a&gt;,&amp;nbsp;remember to adhere to the decorum of the Community Forum when asking a question.&lt;BR /&gt;&lt;BR /&gt;Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523/highlight/true#M607150" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523/highlight/true#M607150&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="color: darkblue;"&gt;&lt;EM&gt;If your requirement is solved, please make THIS ANSWER a SOLUTION &lt;/EM&gt;&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;EM&gt; and help other users find the solution quickly. Please hit the LIKE &lt;/EM&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;EM&gt; button if this comment helps you.&amp;nbsp; Proud to be a Super User!&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jul 2024 12:14:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Use-dynamic-column-names-in-calculation-groups/m-p/4028661#M53988</guid>
      <dc:creator>foodd</dc:creator>
      <dc:date>2024-07-07T12:14:25Z</dc:date>
    </item>
  </channel>
</rss>

