<?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: Slicer on conditionnal displaying measure based on 2 columns from 2 tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-on-conditionnal-displaying-measure-based-on-2-columns/m-p/1562451#M31019</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; As you have said, this is just sample data, so are you wanting this to work for more than just 'spoon' ? I am not sure what you're trying to display with 'display'? It looks like you are wanting to replace the [Category] value with 'Specialties' for some cases, but I'm not clear yet what that case may be in general?&lt;/P&gt;</description>
    <pubDate>Mon, 21 Dec 2020 09:58:00 GMT</pubDate>
    <dc:creator>AllisonKennedy</dc:creator>
    <dc:date>2020-12-21T09:58:00Z</dc:date>
    <item>
      <title>Slicer on conditionnal displaying measure based on 2 columns from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-on-conditionnal-displaying-measure-based-on-2-columns/m-p/1556968#M30859</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a measure that displays a specified value based on the value of two columns in two different tables:&lt;/P&gt;&lt;P&gt;Table 1: Business Segment&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Business Segment&lt;/TD&gt;&lt;TD&gt;Application&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Garden&lt;/TD&gt;&lt;TD&gt;DIY&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;House&lt;/TD&gt;&lt;TD&gt;Kitchen&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Table 2: Products&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ProductCategory&lt;/TD&gt;&lt;TD&gt;ProductName&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Tool&lt;/TD&gt;&lt;TD&gt;Spoon&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I also have my data table linking all the information:&lt;/P&gt;&lt;P&gt;Table 3: datas&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ProductName&lt;/TD&gt;&lt;TD&gt;Application&lt;/TD&gt;&lt;TD&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spoon&lt;/TD&gt;&lt;TD&gt;DIY&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spoon&lt;/TD&gt;&lt;TD&gt;Kitchen&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is of course an example, I have about 400 products, as many applications etc.&lt;/P&gt;&lt;P&gt;Here is the result I would like to obtain:&lt;/P&gt;&lt;P&gt;Table 4: Results&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Business Segment&lt;/TD&gt;&lt;TD&gt;ProductName&lt;/TD&gt;&lt;TD&gt;Display&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Garden&lt;/TD&gt;&lt;TD&gt;Spoon&lt;/TD&gt;&lt;TD&gt;Specialties&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;House&lt;/TD&gt;&lt;TD&gt;Spoon&lt;/TD&gt;&lt;TD&gt;Tool&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For this, I used this measure which works well:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Display = IF (
CONTAINS ( Products, Products [ProductName], "Spoon" ),
SWITCH (
TRUE, 
CONTAINS ('Business Segment', 'Business Segment' [Business Segment], 'House'), SELECTEDVALUE(Products [Product Category]),
CONTAINS ('Business Segment', 'Business Segment' [Business Segment], 'Garden'), 'Specialities'),
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So I end up with a measure that displays the values I want correctly, but my problem comes when I want to create a "slicer" on this measure. Because at the end I would like to be able to study my sales according to what is displayed in the [Display] column and see my sales for "Specialities", "Tool" or other.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you also have another idea/ know another way of doing this measure to have a dynamic display I am a taker!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance !&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 15:24:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-on-conditionnal-displaying-measure-based-on-2-columns/m-p/1556968#M30859</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-17T15:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer on conditionnal displaying measure based on 2 columns from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-on-conditionnal-displaying-measure-based-on-2-columns/m-p/1562451#M31019</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; As you have said, this is just sample data, so are you wanting this to work for more than just 'spoon' ? I am not sure what you're trying to display with 'display'? It looks like you are wanting to replace the [Category] value with 'Specialties' for some cases, but I'm not clear yet what that case may be in general?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 09:58:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-on-conditionnal-displaying-measure-based-on-2-columns/m-p/1562451#M31019</guid>
      <dc:creator>AllisonKennedy</dc:creator>
      <dc:date>2020-12-21T09:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer on conditionnal displaying measure based on 2 columns from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-on-conditionnal-displaying-measure-based-on-2-columns/m-p/1578864#M31542</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="227497" data-lia-user-login="AllisonKennedy" class="lia-mention lia-mention-user"&gt;AllisonKennedy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;So, yes I want this to work for more than "Spoon".&lt;/P&gt;&lt;P&gt;What I want to display with "Display" is just a new calling of the Product that depends on the ProductName AND on the Business Segment that are both columns located in different tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is in fact because the Spoons (as many other products) are sold within several Business Segment and I want to be able to study the sales depending on "categories" within the Business Segments.&lt;/P&gt;&lt;P&gt;For example in the Business Segment "Garden" I want to name myself the category, this is why I wrote "Specialties" but in other Business Segment such as "House" I want to display the "Product Category"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope my explanation makes it clearer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 08:29:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-on-conditionnal-displaying-measure-based-on-2-columns/m-p/1578864#M31542</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-04T08:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer on conditionnal displaying measure based on 2 columns from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-on-conditionnal-displaying-measure-based-on-2-columns/m-p/1579189#M31550</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; You must have a pattern or set of rules that we can tell Power BI, so you either need to build another table that lists all the categories and products and what you want to rename the category, or you need to define the rules that determine when you rename and when you don't. Are there set rules we can use? Please try to explain how you decide when to rename the category.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 11:01:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-on-conditionnal-displaying-measure-based-on-2-columns/m-p/1579189#M31550</guid>
      <dc:creator>AllisonKennedy</dc:creator>
      <dc:date>2021-01-04T11:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer on conditionnal displaying measure based on 2 columns from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-on-conditionnal-displaying-measure-based-on-2-columns/m-p/1602394#M32138</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="227497" data-lia-user-login="AllisonKennedy" class="lia-mention lia-mention-user"&gt;AllisonKennedy&lt;/a&gt;&amp;nbsp;So yes, I could make a table with the rules that we tell PBI and this table would be like :&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ProductName&lt;/TD&gt;&lt;TD&gt;Business Segment&lt;/TD&gt;&lt;TD&gt;Display&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spoon&lt;/TD&gt;&lt;TD&gt;House&lt;/TD&gt;&lt;TD&gt;'Specialties'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spoon&lt;/TD&gt;&lt;TD&gt;Garden&lt;/TD&gt;&lt;TD&gt;corresponding [Product Category] = Tool&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because all depends of the Business Segment in fact.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All this is because we are selling many products and when we want to analyse our sales we need to be able to analyse by Business Segment and within those Business Segments we do not analyse our products the same way. In the Business Segment "House" we decided to analyse our sales by group of products that are chosen for a technical reasons and I can make a table of this corresponding group of products. For the Business Segment "Garden" we analyse our sales with the ProductCategory that is already a column in my pbix file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to have the same file for the study of all Business Segment otherwise it's too complicated, this is why I need to have a display that is dynamic depending on the Business Segment I want to focus.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this is clear enough...&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 15:46:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-on-conditionnal-displaying-measure-based-on-2-columns/m-p/1602394#M32138</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-15T15:46:15Z</dc:date>
    </item>
  </channel>
</rss>

