<?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 Dynamic Column Headers in matrix - Report Server in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3787136#M33833</link>
    <description>&lt;P&gt;Hi everyone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like the matrix headers to be partly static and partly dynamic.&lt;/P&gt;&lt;P&gt;Like this below&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;The base structure is simple, I have a fact table, a calendar table and several dimension tables in a star schema.&lt;/P&gt;&lt;P&gt;For my part, try the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1- Create an order column in the calendar table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Orden = YEAR(CALENDARIO[FECHA]) * 100 + MONTH(CALENDARIO[FECHA])&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2- Create a summary table of the fields I need to use as a slicer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;TablaApoyo =
SUMMARIZE(
    CALENDARIO,
    CALENDARIO[FINMES],
    CALENDARIO[Orden],
    CALENDARIO[Mes])&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 -&amp;nbsp;Create a measure that if the maximum order field in the calendar table is equal to the maximum order field in the "TablaApoyo" or equal to the maximum order value - 1, then calculate the units. In the case of the month of January, create another if condition, changing the -1 to -89 because the -89 indicates exactly the difference between January and December&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;PRUEBA = 
IF(
    MAX(TablaApoyo[Mes] ) = 1,
    IF(
        MAX(CALENDARIO[Orden])
            IN {MAX(TablaApoyo[Orden]) , MAX(TablaApoyo[Orden]) - 89 , MAX(TablaApoyo[Orden]) - 100},
            [Unidades],
            BLANK()
    ),
    IF(
        MAX(CALENDARIO[Orden])
            IN {MAX(TablaApoyo[Orden]) , MAX(TablaApoyo[Orden]) -1, MAX(TablaApoyo[Orden]) -100},
            [Unidades],
            BLANK()
    )
)&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a result I get the dynamic header but I cannot add the text correctly with this approach.&lt;/P&gt;&lt;P&gt;This is the result&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate in advance any help you can give me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an &lt;A title="GitHub Example" href="https://github.com/MathiasChd/PBI_Forum/blob/main/dynamic_header.pbix" target="_blank" rel="noopener"&gt;example&lt;/A&gt; file and i based myself on this &lt;A title="YoutubeVideo" href="https://www.youtube.com/watch?v=VK1gMYOcXDk&amp;amp;t=3s" target="_blank" rel="noopener"&gt;video&lt;/A&gt; for the solution in part, but it's not what I'm looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Mar 2024 01:59:51 GMT</pubDate>
    <dc:creator>MathiasChaparro</dc:creator>
    <dc:date>2024-03-23T01:59:51Z</dc:date>
    <item>
      <title>Dynamic Column Headers in matrix - Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3787136#M33833</link>
      <description>&lt;P&gt;Hi everyone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like the matrix headers to be partly static and partly dynamic.&lt;/P&gt;&lt;P&gt;Like this below&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;The base structure is simple, I have a fact table, a calendar table and several dimension tables in a star schema.&lt;/P&gt;&lt;P&gt;For my part, try the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1- Create an order column in the calendar table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Orden = YEAR(CALENDARIO[FECHA]) * 100 + MONTH(CALENDARIO[FECHA])&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2- Create a summary table of the fields I need to use as a slicer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;TablaApoyo =
SUMMARIZE(
    CALENDARIO,
    CALENDARIO[FINMES],
    CALENDARIO[Orden],
    CALENDARIO[Mes])&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 -&amp;nbsp;Create a measure that if the maximum order field in the calendar table is equal to the maximum order field in the "TablaApoyo" or equal to the maximum order value - 1, then calculate the units. In the case of the month of January, create another if condition, changing the -1 to -89 because the -89 indicates exactly the difference between January and December&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;PRUEBA = 
IF(
    MAX(TablaApoyo[Mes] ) = 1,
    IF(
        MAX(CALENDARIO[Orden])
            IN {MAX(TablaApoyo[Orden]) , MAX(TablaApoyo[Orden]) - 89 , MAX(TablaApoyo[Orden]) - 100},
            [Unidades],
            BLANK()
    ),
    IF(
        MAX(CALENDARIO[Orden])
            IN {MAX(TablaApoyo[Orden]) , MAX(TablaApoyo[Orden]) -1, MAX(TablaApoyo[Orden]) -100},
            [Unidades],
            BLANK()
    )
)&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a result I get the dynamic header but I cannot add the text correctly with this approach.&lt;/P&gt;&lt;P&gt;This is the result&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate in advance any help you can give me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an &lt;A title="GitHub Example" href="https://github.com/MathiasChd/PBI_Forum/blob/main/dynamic_header.pbix" target="_blank" rel="noopener"&gt;example&lt;/A&gt; file and i based myself on this &lt;A title="YoutubeVideo" href="https://www.youtube.com/watch?v=VK1gMYOcXDk&amp;amp;t=3s" target="_blank" rel="noopener"&gt;video&lt;/A&gt; for the solution in part, but it's not what I'm looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2024 01:59:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3787136#M33833</guid>
      <dc:creator>MathiasChaparro</dc:creator>
      <dc:date>2024-03-23T01:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Headers in matrix - Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3789359#M33843</link>
      <description>&lt;P&gt;None of these dates are dynamic. Add two (or three)&amp;nbsp; columns to your calendar table that reference "Same date last month" and "Same date last year"&amp;nbsp; in either date or text format.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 13:28:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3789359#M33843</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-25T13:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Headers in matrix - Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3789494#M33846</link>
      <description>&lt;P&gt;Thank you very much for the response, would you have any example of the solution you mention?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 14:42:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3789494#M33846</guid>
      <dc:creator>MathiasChaparro</dc:creator>
      <dc:date>2024-03-25T14:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Headers in matrix - Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3789608#M33848</link>
      <description>&lt;LI-CODE lang="markup"&gt;Calendar = ADDCOLUMNS(CALENDAR("2024-02-24",TODAY()),"Year",FORMAT([Date],"yyyy"),"Month",FORMAT([Date],"mmm"),"MNo",FORMAT([Date],"mm"),"One Month Ago",EDATE([Date],-1),"One Year ago",EDATE([Date],-12))&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 25 Mar 2024 15:35:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3789608#M33848</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-25T15:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Headers in matrix - Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3790065#M33850</link>
      <description>&lt;P&gt;I tried the example but I still need a column that has the format of the image and that is dynamic when selecting the slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the proposed solution I must create 3 new columns and it does not include the text that I must display visually as a header along with the date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;this is the final output format I'm looking for. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 20:42:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3790065#M33850</guid>
      <dc:creator>MathiasChaparro</dc:creator>
      <dc:date>2024-03-25T20:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Headers in matrix - Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3790117#M33851</link>
      <description>&lt;LI-CODE lang="markup"&gt;Calendar = ADDCOLUMNS(CALENDAR("2024-02-24",TODAY()),"Year",FORMAT([Date],"yyyy"),"Month",FORMAT([Date],"mmm"),"MNo",FORMAT([Date],"mm"),"Actual","Fecha actual: " &amp;amp; Format([Date],"d/mm/yyyy")
,"One Month Ago","Fecha Anterior: " &amp;amp; Format(EDATE([Date],-1),"d/mm/yyyy")
,"One Year ago","Ano anterior: " &amp;amp; Format(EDATE([Date],-12),"d/mm/yyyy"))&lt;/LI-CODE&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;</description>
      <pubDate>Mon, 25 Mar 2024 21:52:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3790117#M33851</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-25T21:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Column Headers in matrix - Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3965298#M35132</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello Community: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found the solution using Power Query.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I duplicate my "Calendar" table and leave only the "Fin de Mes" field, then add conditional columns to find the previous month and previous year&amp;nbsp;using the functions &lt;STRONG&gt;"Date.Add.Years and Date.AddMonths"&lt;/STRONG&gt;&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;As a next step, unpivot columns and add an index to sort the table according to my requirement.&lt;/P&gt;&lt;P&gt;And as a last step I created a measure to contain the values ​​I need in each column&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works perfectly and is what the user was looking for! Thank you for reading &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jun 2024 01:49:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Dynamic-Column-Headers-in-matrix-Report-Server/m-p/3965298#M35132</guid>
      <dc:creator>MathiasChaparro</dc:creator>
      <dc:date>2024-06-01T01:49:54Z</dc:date>
    </item>
  </channel>
</rss>

