<?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 pass a measure as a filter to table visual in Power BI? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-pass-a-measure-as-a-filter-to-table-visual-in-Power-BI/m-p/4089099#M162285</link>
    <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;To filter your MonthYear column using the FifthPreviousMonth measure in Power BI, you can follow these steps:&lt;/P&gt;&lt;H3&gt;1. Ensure the MonthYear Column is in the Visual Filters Pane&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Add the Table Visual&lt;/STRONG&gt; to your report, if not already done.&lt;/LI&gt;&lt;LI&gt;Ensure that the MonthYear column from your date field (which should be created in step 2 of the previous instructions) is present in the &lt;STRONG&gt;Filters&lt;/STRONG&gt; pane for the table visual.&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;2. Add the FifthPreviousMonth Measure to the Visual Filters Pane&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Go to the &lt;STRONG&gt;Visualizations&lt;/STRONG&gt; pane where your table visual is configured.&lt;/LI&gt;&lt;LI&gt;Find the &lt;STRONG&gt;Filters on this visual&lt;/STRONG&gt; section.&lt;/LI&gt;&lt;LI&gt;Drag the MonthYear calculated column to the Filters pane.&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;3. Set the Filter Condition&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;After you have the MonthYear field in the Filters pane:&lt;UL&gt;&lt;LI&gt;Click on the dropdown arrow next to MonthYear.&lt;/LI&gt;&lt;LI&gt;Select the &lt;STRONG&gt;Advanced filtering&lt;/STRONG&gt; option.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;In the filter options:&lt;UL&gt;&lt;LI&gt;Choose &lt;STRONG&gt;"is equal to"&lt;/STRONG&gt; from the dropdown.&lt;/LI&gt;&lt;LI&gt;Click on the small box that allows you to select a field or measure.&lt;/LI&gt;&lt;LI&gt;Select the FifthPreviousMonth measure.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;4. Apply the Filter&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;Once you've set up the condition for MonthYear is equal to FifthPreviousMonth, the filter will apply automatically.&lt;/LI&gt;&lt;LI&gt;Your table visual should now only display the data for the month corresponding to the 5th previous month from the current date.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This setup dynamically filters your table to show only the rows from the desired month and will adjust as the current month changes.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;SPAN class=""&gt;4o&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 08 Aug 2024 11:04:19 GMT</pubDate>
    <dc:creator>123abc</dc:creator>
    <dc:date>2024-08-08T11:04:19Z</dc:date>
    <item>
      <title>How to pass a measure as a filter to table visual in Power BI?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-pass-a-measure-as-a-filter-to-table-visual-in-Power-BI/m-p/4089042#M162280</link>
      <description>&lt;P&gt;I have a calculated measure that gives me the 5th Previous Month from now (March 2024) in this format. How do I use this value to filter a table to show only data from that particular Month and Year?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a demo table. As the current month is August, the 5th previous month will be March, so I would like to display data for that month. Next month, the 5th Month will change to April, and so on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Number&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Person&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/1/2024&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1/2/2024&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;abc&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;3/2/2024&lt;/TD&gt;&lt;TD&gt;pqr&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;3/3/2024&lt;/TD&gt;&lt;TD&gt;ijk&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;4/1/2024&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 08 Aug 2024 10:27:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-pass-a-measure-as-a-filter-to-table-visual-in-Power-BI/m-p/4089042#M162280</guid>
      <dc:creator>monishd</dc:creator>
      <dc:date>2024-08-08T10:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a measure as a filter to table visual in Power BI?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-pass-a-measure-as-a-filter-to-table-visual-in-Power-BI/m-p/4089049#M162281</link>
      <description>&lt;P&gt;To dynamically filter a table visual in Power BI using a calculated measure that determines the 5th previous month, follow these steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create a Date Table&lt;/STRONG&gt; (if not already present):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If you don’t have a Date table, create one using DAX:&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;DateTable = CALENDAR(MIN('YourDataTable'[Date]), MAX('YourDataTable'[Date]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;UL&gt;&lt;LI&gt;Add necessary columns like Year, Month, Month-Year, etc., to this Date table.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create the Calculated Measure&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a measure to calculate the 5th previous month in the format Month-Year.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;FifthPreviousMonth =&lt;BR /&gt;FORMAT(&lt;BR /&gt;EDATE(TODAY(), -5),&lt;BR /&gt;"MMMM YYYY"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Add a Calculated Column to Identify the Month-Year&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In your Date table, add a calculated column to represent the Month-Year&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MonthYear = FORMAT('DateTable'[Date], "MMMM YYYY")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Apply the Filter Using the Measure&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In the Visual Level Filters of your table visual, drag the MonthYear field from the Date table and then filter it by the FifthPreviousMonth measure.&lt;UL&gt;&lt;LI&gt;Set the filter condition to: MonthYear is equal to FifthPreviousMonth.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;By doing this, the table visual will automatically filter to show only the records from the 5th previous month, regardless of when the report is viewed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 10:30:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-pass-a-measure-as-a-filter-to-table-visual-in-Power-BI/m-p/4089049#M162281</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-08-08T10:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a measure as a filter to table visual in Power BI?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-pass-a-measure-as-a-filter-to-table-visual-in-Power-BI/m-p/4089061#M162282</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="766377" data-lia-user-login="monishd" class="lia-mention lia-mention-user"&gt;monishd&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create a measure as below, then apply it to visual filter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;PeriodFilter = 
VAR CurRowDateMonth = FORMAT(MAX('Table'[Date]),"yyyymm")
VAR Pre5thMonth = FORMAT(EDATE(NOW(),-5),"yyyymm")
RETURN
IF(CurRowDateMonth = Pre5thMonth,1,0)&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you~&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 10:41:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-pass-a-measure-as-a-filter-to-table-visual-in-Power-BI/m-p/4089061#M162282</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-08-08T10:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a measure as a filter to table visual in Power BI?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-pass-a-measure-as-a-filter-to-table-visual-in-Power-BI/m-p/4089081#M162284</link>
      <description>&lt;P&gt;Thank you for the quick reply. I have completed all steps except for the last one, i.e.,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Apply the Filter Using the Measure&lt;/STRONG&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In the Visual Level Filters of your table visual, drag the MonthYear field from the Date table and then filter it by the FifthPreviousMonth measure.&lt;UL&gt;&lt;LI&gt;Set the filter condition to: MonthYear is equal to FifthPreviousMonth.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;How do I filter MonthYear = FifthPreviousMonth ?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 10:49:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-pass-a-measure-as-a-filter-to-table-visual-in-Power-BI/m-p/4089081#M162284</guid>
      <dc:creator>monishd</dc:creator>
      <dc:date>2024-08-08T10:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a measure as a filter to table visual in Power BI?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-pass-a-measure-as-a-filter-to-table-visual-in-Power-BI/m-p/4089099#M162285</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;To filter your MonthYear column using the FifthPreviousMonth measure in Power BI, you can follow these steps:&lt;/P&gt;&lt;H3&gt;1. Ensure the MonthYear Column is in the Visual Filters Pane&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Add the Table Visual&lt;/STRONG&gt; to your report, if not already done.&lt;/LI&gt;&lt;LI&gt;Ensure that the MonthYear column from your date field (which should be created in step 2 of the previous instructions) is present in the &lt;STRONG&gt;Filters&lt;/STRONG&gt; pane for the table visual.&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;2. Add the FifthPreviousMonth Measure to the Visual Filters Pane&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Go to the &lt;STRONG&gt;Visualizations&lt;/STRONG&gt; pane where your table visual is configured.&lt;/LI&gt;&lt;LI&gt;Find the &lt;STRONG&gt;Filters on this visual&lt;/STRONG&gt; section.&lt;/LI&gt;&lt;LI&gt;Drag the MonthYear calculated column to the Filters pane.&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;3. Set the Filter Condition&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;After you have the MonthYear field in the Filters pane:&lt;UL&gt;&lt;LI&gt;Click on the dropdown arrow next to MonthYear.&lt;/LI&gt;&lt;LI&gt;Select the &lt;STRONG&gt;Advanced filtering&lt;/STRONG&gt; option.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;In the filter options:&lt;UL&gt;&lt;LI&gt;Choose &lt;STRONG&gt;"is equal to"&lt;/STRONG&gt; from the dropdown.&lt;/LI&gt;&lt;LI&gt;Click on the small box that allows you to select a field or measure.&lt;/LI&gt;&lt;LI&gt;Select the FifthPreviousMonth measure.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;4. Apply the Filter&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;Once you've set up the condition for MonthYear is equal to FifthPreviousMonth, the filter will apply automatically.&lt;/LI&gt;&lt;LI&gt;Your table visual should now only display the data for the month corresponding to the 5th previous month from the current date.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This setup dynamically filters your table to show only the rows from the desired month and will adjust as the current month changes.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;SPAN class=""&gt;4o&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Aug 2024 11:04:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-pass-a-measure-as-a-filter-to-table-visual-in-Power-BI/m-p/4089099#M162285</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-08-08T11:04:19Z</dc:date>
    </item>
  </channel>
</rss>

