<?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 Filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Filter/m-p/4091752#M162384</link>
    <description>&lt;OL&gt;&lt;LI&gt;Dears,&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;i have a table with multi Date for example:&lt;/LI&gt;&lt;LI&gt;ID, Arrive Date, Charge Date, Dischare Date&lt;/LI&gt;&lt;LI&gt;and i have a date slicer from 2020 to 2024&amp;nbsp;&lt;BR /&gt;i need to filter the table have the column mentioned above by a drop down list&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;so if selected value from the list is Arrive then filter the table where Arrive Date between&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;---&amp;gt; if slicer is filtered so filter the table between the slicer min and max dates&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;---&amp;gt; if slicer is not filter so filter the table between last start and end month&amp;nbsp;&lt;BR /&gt;the below DAX&amp;nbsp; not working with error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."&lt;BR /&gt;&lt;P&gt;FIN_List_Posting_Date_Filter =&lt;BR /&gt;VAR DateList = SELECTEDVALUE(My_Report_Date[Report],"Posting Date")&lt;BR /&gt;VAR SlicerMIN = MIN(DateTimeTable[DateTime])&lt;BR /&gt;VAR SlicerMAX = MAX(DateTimeTable[DateTime])&lt;BR /&gt;/*VAR StartDateMIN= IF(NOT(ISFILTERED(My_Report_Date[Report])),[StartDate])&lt;BR /&gt;VAR StartDateMAX= IF(NOT(ISFILTERED(My_Report_Date[Report])),[EndDate])*/&lt;BR /&gt;VAR&lt;BR /&gt;PostedFilter = SWITCH( TRUE(),&lt;BR /&gt;DateList ="Posting Date" , IF(ISFILTERED(DateTimeTable[DateTime]),&lt;BR /&gt;CALCULATETABLE(&lt;BR /&gt;FILTER(Charges,&lt;BR /&gt;Charges[POSTED_DT_TM] &amp;gt;= SlicerMIN &amp;amp;&amp;amp;&lt;BR /&gt;Charges[POSTED_DT_TM] &amp;lt;= SlicerMAX + TIME(0, 59, 59))),&lt;BR /&gt;CALCULATETABLE(&lt;BR /&gt;FILTER(Charges,&lt;BR /&gt;Charges[POSTED_DT_TM] &amp;gt;= [StartDate] &amp;amp;&amp;amp;&lt;BR /&gt;Charges[POSTED_DT_TM] &amp;lt;= [EndDate]+1))))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;RETURN PostedFilter&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Fri, 09 Aug 2024 12:50:38 GMT</pubDate>
    <dc:creator>ahmadhammoud</dc:creator>
    <dc:date>2024-08-09T12:50:38Z</dc:date>
    <item>
      <title>Dynamic Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Filter/m-p/4091752#M162384</link>
      <description>&lt;OL&gt;&lt;LI&gt;Dears,&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;i have a table with multi Date for example:&lt;/LI&gt;&lt;LI&gt;ID, Arrive Date, Charge Date, Dischare Date&lt;/LI&gt;&lt;LI&gt;and i have a date slicer from 2020 to 2024&amp;nbsp;&lt;BR /&gt;i need to filter the table have the column mentioned above by a drop down list&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;so if selected value from the list is Arrive then filter the table where Arrive Date between&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;---&amp;gt; if slicer is filtered so filter the table between the slicer min and max dates&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;---&amp;gt; if slicer is not filter so filter the table between last start and end month&amp;nbsp;&lt;BR /&gt;the below DAX&amp;nbsp; not working with error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."&lt;BR /&gt;&lt;P&gt;FIN_List_Posting_Date_Filter =&lt;BR /&gt;VAR DateList = SELECTEDVALUE(My_Report_Date[Report],"Posting Date")&lt;BR /&gt;VAR SlicerMIN = MIN(DateTimeTable[DateTime])&lt;BR /&gt;VAR SlicerMAX = MAX(DateTimeTable[DateTime])&lt;BR /&gt;/*VAR StartDateMIN= IF(NOT(ISFILTERED(My_Report_Date[Report])),[StartDate])&lt;BR /&gt;VAR StartDateMAX= IF(NOT(ISFILTERED(My_Report_Date[Report])),[EndDate])*/&lt;BR /&gt;VAR&lt;BR /&gt;PostedFilter = SWITCH( TRUE(),&lt;BR /&gt;DateList ="Posting Date" , IF(ISFILTERED(DateTimeTable[DateTime]),&lt;BR /&gt;CALCULATETABLE(&lt;BR /&gt;FILTER(Charges,&lt;BR /&gt;Charges[POSTED_DT_TM] &amp;gt;= SlicerMIN &amp;amp;&amp;amp;&lt;BR /&gt;Charges[POSTED_DT_TM] &amp;lt;= SlicerMAX + TIME(0, 59, 59))),&lt;BR /&gt;CALCULATETABLE(&lt;BR /&gt;FILTER(Charges,&lt;BR /&gt;Charges[POSTED_DT_TM] &amp;gt;= [StartDate] &amp;amp;&amp;amp;&lt;BR /&gt;Charges[POSTED_DT_TM] &amp;lt;= [EndDate]+1))))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;RETURN PostedFilter&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 09 Aug 2024 12:50:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Filter/m-p/4091752#M162384</guid>
      <dc:creator>ahmadhammoud</dc:creator>
      <dc:date>2024-08-09T12:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Filter/m-p/4092344#M162400</link>
      <description>&lt;P&gt;Use a disconnected table for your slicer, and a measure filter for the visual.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 17:09:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Filter/m-p/4092344#M162400</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-09T17:09:17Z</dc:date>
    </item>
  </channel>
</rss>

