<?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: How to create measure and axis based on parameter/slicer selection in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-measure-and-axis-based-on-parameter-slicer/m-p/3018198#M102569</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="477226" data-lia-user-login="Laocsulak" class="lia-mention lia-mention-user"&gt;Laocsulak&lt;/a&gt; , Refer How Switch measure in field parameter &lt;/P&gt;
&lt;P&gt;Switch TOPN with Field Parameters: &lt;A href="https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f" target="_blank"&gt;https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI Field Parameters — A Quick way for Dynamic Visuals: &lt;A href="https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd" target="_blank"&gt;https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd&lt;/A&gt;&lt;BR /&gt;Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: &lt;A href="https://youtu.be/lqF3Wa1FllE" target="_blank"&gt;https://youtu.be/lqF3Wa1FllE&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Others &lt;BR /&gt;Field Parameters- Conditional Formatting: &lt;A href="https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf" target="_blank"&gt;https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2023 02:35:05 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2023-01-13T02:35:05Z</dc:date>
    <item>
      <title>How to create measure and axis based on parameter/slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-measure-and-axis-based-on-parameter-slicer/m-p/3018035#M102556</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have created a bar chart where X axis is month or quarter based on parameter selection. Also, I have created a measure that shows month over month variation, but I would like that &lt;U&gt;the measure shows quarter over quarter variation when the quarter is selected for X axis parameter&lt;/U&gt;. Anyone know how to solve this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Measure created to show month over month variation:&lt;/P&gt;&lt;P&gt;TPV MoM =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TPV MoM = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; __PREV_MONTH =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(Sheet1,Sheet1[amount]) , &lt;/SPAN&gt;&lt;SPAN&gt;DATEADD&lt;/SPAN&gt;&lt;SPAN&gt; ( 'Calendario'[Date], -&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, MONTH ) )&lt;/SPAN&gt;&lt;/DIV&g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lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN&gt;"Trimestre"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;NAMEOF&lt;/SPAN&gt;&lt;SPAN&gt;('Calendario'[Trimestre]), &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dummy example:&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/drive/folders/1Cssqngz5G645NpiZRjnTQ74oxBYoj6db?usp=sharing" target="_blank"&gt;https://drive.google.com/drive/folders/1Cssqngz5G645NpiZRjnTQ74oxBYoj6db?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 00:07:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-measure-and-axis-based-on-parameter-slicer/m-p/3018035#M102556</guid>
      <dc:creator>Laocsulak</dc:creator>
      <dc:date>2023-01-13T00:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to create measure and axis based on parameter/slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-measure-and-axis-based-on-parameter-slicer/m-p/3018198#M102569</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="477226" data-lia-user-login="Laocsulak" class="lia-mention lia-mention-user"&gt;Laocsulak&lt;/a&gt; , Refer How Switch measure in field parameter &lt;/P&gt;
&lt;P&gt;Switch TOPN with Field Parameters: &lt;A href="https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f" target="_blank"&gt;https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI Field Parameters — A Quick way for Dynamic Visuals: &lt;A href="https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd" target="_blank"&gt;https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd&lt;/A&gt;&lt;BR /&gt;Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: &lt;A href="https://youtu.be/lqF3Wa1FllE" target="_blank"&gt;https://youtu.be/lqF3Wa1FllE&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Others &lt;BR /&gt;Field Parameters- Conditional Formatting: &lt;A href="https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf" target="_blank"&gt;https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 02:35:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-measure-and-axis-based-on-parameter-slicer/m-p/3018198#M102569</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-01-13T02:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create measure and axis based on parameter/slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-measure-and-axis-based-on-parameter-slicer/m-p/3018214#M102571</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="477226" data-lia-user-login="Laocsulak" class="lia-mention lia-mention-user"&gt;Laocsulak&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Please try to create a measure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;infectionSwitchStatement = 
var Infection =
SWITCH (
    SELECTEDVALUE('Eje X'[X Axis Fields]),
    "Mensual", 'metricas'[TPV MoM],
    "Trimestral", 'metricas'[TPV QoQ]
    
)
return Infection&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer to the following document for more information.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/The-workaround-of-using-the-measure-as-axis-in-the-visual/ba-p/1659929" target="_blank" rel="noopener"&gt;The workaround of using the measure as axis in the... - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Field-Parameters-in-Power-BI/ba-p/2594308" target="_blank" rel="noopener"&gt;Field Parameters in Power BI - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/Measure-Calculation-Using-Dynamic-Column-Names/m-p/2918895" target="_blank" rel="noopener"&gt;Measure Calculation Using Dynamic Column Names - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 08:39:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-measure-and-axis-based-on-parameter-slicer/m-p/3018214#M102571</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-16T08:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create measure and axis based on parameter/slicer selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-measure-and-axis-based-on-parameter-slicer/m-p/3020108#M102707</link>
      <description>&lt;P&gt;Thanks for the answer, but what I need to see is the percentage variation month over month and quarter over quarter, and this createad measure is not showing any value.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 19:16:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-measure-and-axis-based-on-parameter-slicer/m-p/3020108#M102707</guid>
      <dc:creator>Laocsulak</dc:creator>
      <dc:date>2023-01-13T19:16:48Z</dc:date>
    </item>
  </channel>
</rss>

