<?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: Measure Totals in a table visual using Field Parameters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Totals-in-a-table-visual-using-Field-Parameters/m-p/3345535#M125608</link>
    <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="523532" data-lia-user-login="marcuspaula" class="lia-mention lia-mention-user"&gt;marcuspaula&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;I'd like to suggest you add switch function to your measure formula to interact with field parameter filter effects and redirect to different calculations:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://endjin.com/blog/2022/06/how-to-dynamically-switch-between-measures-in-power-bi-visuals-with-field-parameters" target="_blank"&gt;How to dynamically switch between measures in Power BI visuals with Field Parameters | endjin - Azure Data Analytics Consultancy UK&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jul 2023 01:46:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-07-24T01:46:50Z</dc:date>
    <item>
      <title>Measure Totals in a table visual using Field Parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Totals-in-a-table-visual-using-Field-Parameters/m-p/3341787#M125447</link>
      <description>&lt;P&gt;Hello, community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to dynamically calculate totals in a table using Field Parameters?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following data:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following Field Parameter:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Parameter - Dimensions = {
    ("Category1", NAMEOF('Table'[Category1]), 0),
    ("Category2", NAMEOF('Table'[Category2]), 1)
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the following measures:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;.Sum = 
SUM('Table'[Value])-50&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;LI-CODE lang="markup"&gt;.Sum Field Parameter = 
VAR __table = 
    SUMMARIZE(
        'Parameter - Dimensions',
        'Parameter - Dimensions'[Parameter - Dimensions Fields],
        "@row",[.Sum]
    )
RETURN
IF(
    HASONEVALUE('Parameter - Dimensions'[Parameter - Dimensions Fields]),
    [.Sum],
    SUMX(__table,[@row])
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the result (3500) I was expecting for my second measure on a Matrix visual:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the result I would expect if selecting &lt;STRONG&gt;Category1&lt;/STRONG&gt;&amp;nbsp;(3450):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS. if I use the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;.Sum Field Parameter := 
SUMX(
    VALUES('Table'[Category1]),
    [.Sum]
)&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;&lt;P&gt;I have the desired result for the total row (which is the sum of rows). But I would like to dynamically change the column in the SUMX to whatever is selected on the field parameter if possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 23:05:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Totals-in-a-table-visual-using-Field-Parameters/m-p/3341787#M125447</guid>
      <dc:creator>marcuspaula</dc:creator>
      <dc:date>2023-07-21T23:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals in a table visual using Field Parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Totals-in-a-table-visual-using-Field-Parameters/m-p/3345535#M125608</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="523532" data-lia-user-login="marcuspaula" class="lia-mention lia-mention-user"&gt;marcuspaula&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;I'd like to suggest you add switch function to your measure formula to interact with field parameter filter effects and redirect to different calculations:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://endjin.com/blog/2022/06/how-to-dynamically-switch-between-measures-in-power-bi-visuals-with-field-parameters" target="_blank"&gt;How to dynamically switch between measures in Power BI visuals with Field Parameters | endjin - Azure Data Analytics Consultancy UK&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 01:46:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Totals-in-a-table-visual-using-Field-Parameters/m-p/3345535#M125608</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-24T01:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals in a table visual using Field Parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Totals-in-a-table-visual-using-Field-Parameters/m-p/3351570#M125858</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to avoid the SWITCH since I have like 30 different scenarios but it looks like this is the way to get this working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 16:26:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Totals-in-a-table-visual-using-Field-Parameters/m-p/3351570#M125858</guid>
      <dc:creator>marcuspaula</dc:creator>
      <dc:date>2023-07-26T16:26:03Z</dc:date>
    </item>
  </channel>
</rss>

