<?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 DAX query for alternative of what if parameters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-query-for-alternative-of-what-if-parameters/m-p/3716414#M144659</link>
    <description>&lt;P&gt;Hi Guys!&lt;/P&gt;&lt;P&gt;I'm encountering an problem in which i want to acheive what if parameters functionality because i'm using Report server and it won't work on RS , i need to use same working like pattern , now if i want to get all the values of a column in a measure how can i do it just like SQL query in which e.g select col1 from tab1; i want to achieve same thing in dax&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 08:25:24 GMT</pubDate>
    <dc:creator>zainqazi96</dc:creator>
    <dc:date>2024-02-22T08:25:24Z</dc:date>
    <item>
      <title>DAX query for alternative of what if parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-query-for-alternative-of-what-if-parameters/m-p/3716414#M144659</link>
      <description>&lt;P&gt;Hi Guys!&lt;/P&gt;&lt;P&gt;I'm encountering an problem in which i want to acheive what if parameters functionality because i'm using Report server and it won't work on RS , i need to use same working like pattern , now if i want to get all the values of a column in a measure how can i do it just like SQL query in which e.g select col1 from tab1; i want to achieve same thing in dax&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 08:25:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-query-for-alternative-of-what-if-parameters/m-p/3716414#M144659</guid>
      <dc:creator>zainqazi96</dc:creator>
      <dc:date>2024-02-22T08:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: DAX query for alternative of what if parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-query-for-alternative-of-what-if-parameters/m-p/3716486#M144662</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="687293" data-lia-user-login="zainqazi96" class="lia-mention lia-mention-user"&gt;zainqazi96&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please try the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;Create a Calculated Table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DistinctColumnValues = DISTINCT('TableName'[ColumnName])
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;Use the calculated table to create a slicer in your report&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;Create a Measure to Reflect the "What If" Selection&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DynamicMeasure = 
VAR SelectedValue = SELECTEDVALUE('DistinctColumnValues'[ColumnName], "Default Value")
RETURN
CALCULATE(
    [YourCalculation],
    FILTER(
        'TableName',
        'TableName'[ColumnName] = SelectedValue
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 08:48:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-query-for-alternative-of-what-if-parameters/m-p/3716486#M144662</guid>
      <dc:creator>Sahir_Maharaj</dc:creator>
      <dc:date>2024-02-22T08:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: DAX query for alternative of what if parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-query-for-alternative-of-what-if-parameters/m-p/3716689#M144671</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="501067" data-lia-user-login="Sahir_Maharaj" class="lia-mention lia-mention-user"&gt;Sahir_Maharaj&lt;/a&gt;&amp;nbsp;i don't get it , how can i use column name in slicers , based on dynamic selections&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 09:41:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-query-for-alternative-of-what-if-parameters/m-p/3716689#M144671</guid>
      <dc:creator>zainqazi96</dc:creator>
      <dc:date>2024-02-22T09:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: DAX query for alternative of what if parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-query-for-alternative-of-what-if-parameters/m-p/3719071#M144802</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="687293" data-lia-user-login="zainqazi96" class="lia-mention lia-mention-user"&gt;zainqazi96&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use &lt;STRONG&gt;reference&lt;/STRONG&gt; in the power query first and then convert the table by &lt;STRONG&gt;unpivot column&lt;/STRONG&gt; and remove the unwanted columns.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;then create below formula in powerbi, enabling dynamic selection of column name in the slicer.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;slicer_by_columnName = VALUES('Table (2)'[Attribute])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 07:16:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-query-for-alternative-of-what-if-parameters/m-p/3719071#M144802</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-23T07:16:53Z</dc:date>
    </item>
  </channel>
</rss>

