<?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: Filter a bar chart based on selected matrix cell in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3913752#M152372</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="738384" data-lia-user-login="xifeng_L" class="lia-mention lia-mention-user"&gt;xifeng_L&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution has worked perfectly. The only problem is that I can't use conditional formatting to the bar chart. I want to highlight the bar with max value but no matter what I try it's be overwritten &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea how to solve it?&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2024 11:15:38 GMT</pubDate>
    <dc:creator>Dimitris_Kats</dc:creator>
    <dc:date>2024-05-13T11:15:38Z</dc:date>
    <item>
      <title>Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3909756#M152274</link>
      <description>&lt;P&gt;Hi dear members.&lt;/P&gt;&lt;P&gt;I need your help.&lt;/P&gt;&lt;P&gt;I have a matrix with categories in the rows and multiple measures in the values.&lt;/P&gt;&lt;P&gt;For example in the rows I have:&lt;/P&gt;&lt;P&gt;Category 1&lt;/P&gt;&lt;P&gt;Category 2&lt;/P&gt;&lt;P&gt;Category 3&lt;/P&gt;&lt;P&gt;And in the columns:&lt;/P&gt;&lt;P&gt;Measure 1&lt;/P&gt;&lt;P&gt;Measure 2&lt;/P&gt;&lt;P&gt;Measure 3&lt;/P&gt;&lt;P&gt;I want to create a bar chart next to the matrix enabling users to select a specific cell(for example Measure 3, category 1) and display only that measure to the bar chart. Currently the bar chart display all measures for the selected row.&lt;/P&gt;&lt;P&gt;Any idea how to filter not only the rows but the .measure as well??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 18:55:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3909756#M152274</guid>
      <dc:creator>Dimitris_Kats</dc:creator>
      <dc:date>2024-05-10T18:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910416#M152296</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="324110" data-lia-user-login="Dimitris_Kats" class="lia-mention lia-mention-user"&gt;Dimitris_Kats&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chart interaction can only pass filters for dimension fields to other objects. So, it is necessary to use the column labels of the matrix to achieve filter passing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if the column labels of the matrix are used, only one measure can be added, so this measure needs to be able to calculate different indicators based on different column label items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Solution as follow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#1. Create an auxiliary table to use as a matrix column label. Such as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;//New Table Expression

ColumnTable = 
DATATABLE(
    "Item",STRING,
    "Index",INTEGER,
    {
        {"Measure1",1},
        {"Measure2",2},
        {"Measure3",3}
    }
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#2. Create a dynamic measure that can calculate different indicators based on different column labels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;//Measure Expression

AutoIndicator = 
VAR CurIndicator = SELECTEDVALUE('ColumnTable'[Item])
RETURN
SWITCH(
    CurIndicator,
    "Measure1",[Measure1],
    "Measure2",[Measure2],
    "Measure3",[Measure3]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#3.&amp;nbsp;Place the measure or column label fields created above into matrices and bar charts.&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#4.&amp;nbsp;Edit interaction settings to filter.&lt;/P&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;After completing the above settings, you can meet your needs. Such as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#Default&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Selected&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 a&lt;SPAN&gt;ppreciate your Kudos&lt;/SPAN&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you~&lt;/P&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;</description>
      <pubDate>Sat, 11 May 2024 07:39:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910416#M152296</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-05-11T07:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910566#M152303</link>
      <description>&lt;P&gt;Thank you so much &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="738384" data-lia-user-login="xifeng_L" class="lia-mention lia-mention-user"&gt;xifeng_L&lt;/a&gt;&amp;nbsp; for your time and help. Is it possible to share with me the pbix file??&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's a little hard for me to follow your instructions based on the images.&lt;/P&gt;&lt;P&gt;Thank you very much &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 11:25:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910566#M152303</guid>
      <dc:creator>Dimitris_Kats</dc:creator>
      <dc:date>2024-05-11T11:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910630#M152305</link>
      <description>&lt;P&gt;FYR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!Avkq2QNvDlkrwS3oCJvCPlOqrI3u" target="_blank"&gt;Demo - Filter a bar chart based on selected matrix cell.pbix&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 12:16:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910630#M152305</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-05-11T12:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910774#M152307</link>
      <description>&lt;P&gt;This is great. Thank you so much.&lt;/P&gt;&lt;P&gt;I was wondering if it is possible when there isn't selected any cell to display only one measure instead of all measures??&lt;/P&gt;&lt;P&gt;For example by default the bar chart to display measure 1 if no cell is selected.&lt;/P&gt;&lt;P&gt;I hope this isn't a crazy request &lt;span class="lia-unicode-emoji" title=":see_no_evil_monkey:"&gt;🙈&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 13:54:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910774#M152307</guid>
      <dc:creator>Dimitris_Kats</dc:creator>
      <dc:date>2024-05-11T13:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910792#M152308</link>
      <description>&lt;P&gt;Sure, it can be&amp;nbsp;&lt;SPAN&gt;achieve.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can create a new measure and use for bar chart. Pls refer to follow pic:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Use of Bar Chart = 
IF(COUNTROWS(ALLSELECTED(ColumnTable[Item]))&amp;gt;1,
    CALCULATE([AutoIndicator],KEEPFILTERS('ColumnTable'[Item]="Measure1")),
    [AutoIndicator]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, when you select any cells, it &lt;SPAN&gt;will display the corresponding indicators.&lt;/SPAN&gt;&lt;/P&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;Did I answer your question? If yes, pls mark my post as a solution and a&lt;SPAN&gt;ppreciate your Kudos&lt;/SPAN&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 14:07:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910792#M152308</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-05-11T14:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910804#M152309</link>
      <description>&lt;P&gt;Oh that's amazing!! Thank you so much!!&lt;/P&gt;&lt;P&gt;One last question, I promise &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I want to add in the rows of bar chart instead of the category the region and when no cell is selected in the matrix to display specific category and measure ( for example category 1 and measure 1) but when a cell is selected in the matrix (the matrix remains the same) to filter the bar chart based on the selected cell ( the corresponding category and measure)&lt;/P&gt;&lt;P&gt;I hope I am not asking for too much.&lt;/P&gt;&lt;P&gt;I want to thank you very much for your help. I really appreciate that &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 14:21:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910804#M152309</guid>
      <dc:creator>Dimitris_Kats</dc:creator>
      <dc:date>2024-05-11T14:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910820#M152310</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Let's slightly modify the expression of the measure, pls try again.&lt;/SPAN&gt;&lt;/P&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Use of Bar Chart = 
IF(COUNTROWS(ALLSELECTED(ColumnTable[Item]))&amp;gt;1,
    CALCULATE(
        [AutoIndicator],
        KEEPFILTERS('ColumnTable'[Item]="Measure1"),
        KEEPFILTERS('Fact'[Category]="Category1")
    ),
    [AutoIndicator]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 14:35:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910820#M152310</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-05-11T14:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910834#M152311</link>
      <description>&lt;P&gt;This is amazing!!! It worked perfectly!!!&lt;/P&gt;&lt;P&gt;Thank you so so much &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 14:47:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3910834#M152311</guid>
      <dc:creator>Dimitris_Kats</dc:creator>
      <dc:date>2024-05-11T14:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3913752#M152372</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="738384" data-lia-user-login="xifeng_L" class="lia-mention lia-mention-user"&gt;xifeng_L&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution has worked perfectly. The only problem is that I can't use conditional formatting to the bar chart. I want to highlight the bar with max value but no matter what I try it's be overwritten &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea how to solve it?&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 11:15:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3913752#M152372</guid>
      <dc:creator>Dimitris_Kats</dc:creator>
      <dc:date>2024-05-13T11:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3914326#M152392</link>
      <description>&lt;P&gt;Sorry, I have no idea about this. Because after using the legend field, it is not possible to continue with the conditional formatting feature.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 14:31:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3914326#M152392</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-05-13T14:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a bar chart based on selected matrix cell</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3914417#M152394</link>
      <description>&lt;P&gt;No worries. Thank you very much for your help&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 15:12:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-bar-chart-based-on-selected-matrix-cell/m-p/3914417#M152394</guid>
      <dc:creator>Dimitris_Kats</dc:creator>
      <dc:date>2024-05-13T15:12:30Z</dc:date>
    </item>
  </channel>
</rss>

