<?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 Problems with SWITCH(TRUE() Function in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-with-SWITCH-TRUE-Function/m-p/3340513#M125369</link>
    <description>&lt;P&gt;Hello. I need some help with the SWITCH(TRUE() function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to build a report with the P&amp;amp;L of few different entities. I use a simple P&amp;amp;L Templates where main lines are marked as "0" in column "Subtotals" and subtotal lines are marked as "1".&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;I made a table "P&amp;amp;L Amounts with columns: Company code, P&amp;amp;L Items, Month, Actual amount".&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the a DAX measure like this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(PL_Template[Subtotal])=&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, [P&amp;amp;L Actual Amounts],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(PL_Template[Subtotal])=&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, [P&amp;amp;L Subtotals],&lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I can get a table where the P&amp;amp;L works only considering consolidate datas, but it doesn't work when I want to see (trough a slicer or a filter, a single entity P&amp;amp;L and also if I add the period/month (I get only the P&amp;amp;L amounts without subtotals).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Is it possible to use this function next to a FILTER() or similar?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2023 11:46:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-07-20T11:46:00Z</dc:date>
    <item>
      <title>Problems with SWITCH(TRUE() Function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-with-SWITCH-TRUE-Function/m-p/3340513#M125369</link>
      <description>&lt;P&gt;Hello. I need some help with the SWITCH(TRUE() function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to build a report with the P&amp;amp;L of few different entities. I use a simple P&amp;amp;L Templates where main lines are marked as "0" in column "Subtotals" and subtotal lines are marked as "1".&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;I made a table "P&amp;amp;L Amounts with columns: Company code, P&amp;amp;L Items, Month, Actual amount".&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the a DAX measure like this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(PL_Template[Subtotal])=&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, [P&amp;amp;L Actual Amounts],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(PL_Template[Subtotal])=&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, [P&amp;amp;L Subtotals],&lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I can get a table where the P&amp;amp;L works only considering consolidate datas, but it doesn't work when I want to see (trough a slicer or a filter, a single entity P&amp;amp;L and also if I add the period/month (I get only the P&amp;amp;L amounts without subtotals).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Is it possible to use this function next to a FILTER() or similar?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 11:46:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-with-SWITCH-TRUE-Function/m-p/3340513#M125369</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-20T11:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SWITCH(TRUE() Function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-with-SWITCH-TRUE-Function/m-p/3391798#M127865</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't really understand what are you trying to obtain. Can you share an example?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 07:23:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-with-SWITCH-TRUE-Function/m-p/3391798#M127865</guid>
      <dc:creator>mlsx4</dc:creator>
      <dc:date>2023-08-22T07:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SWITCH(TRUE() Function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-with-SWITCH-TRUE-Function/m-p/3408706#M128814</link>
      <description>&lt;P&gt;Hello ! Thanks for your reply. I actually wanted to have a full income statement by company code. I worked on the report from the time being and I changed it, replacing the dax codes above with calculated tables. I notice that the issue I have is with the relations between 3 tables when looking up at the company codes, as I don't manage to have the relation active for all these tables. I guess I will have to open a new thread for this. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 11:18:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-with-SWITCH-TRUE-Function/m-p/3408706#M128814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-31T11:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SWITCH(TRUE() Function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-with-SWITCH-TRUE-Function/m-p/3444600#M130984</link>
      <description>&lt;P&gt;I hope this message finds you well. I've noticed that this solution remain unresolved. If any of you have managed to find a resolution to the issue, I kindly request that you share your solution for the benefit of the entire community. Alternatively, if you're still facing challenges, please do let us know as well.&lt;/P&gt;
&lt;P&gt;Your insights and updates will greatly assist others who might be encountering the same challenge.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 08:10:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problems-with-SWITCH-TRUE-Function/m-p/3444600#M130984</guid>
      <dc:creator>technolog</dc:creator>
      <dc:date>2023-09-24T08:10:25Z</dc:date>
    </item>
  </channel>
</rss>

