<?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: DAX  SWITCH TRUE  - help needed in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/969403#M11547</link>
    <description>If your table is linked to another via 1:*, then, first of all, there may be many values in the second table for a single row in the first table and secondly, to reach the "many" side of the relationship you have to use RELATEDTABLE.&lt;BR /&gt;&lt;BR /&gt;I'd suggest you think well over again what you want to do because what you are trying to do right now is not doable.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
    <pubDate>Wed, 11 Mar 2020 16:07:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-03-11T16:07:11Z</dc:date>
    <item>
      <title>DAX  SWITCH TRUE  - help needed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/967078#M11476</link>
      <description>&lt;P&gt;Hi community / DAX experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help here on DAX statement that I cannot get working.&lt;/P&gt;&lt;P&gt;I have 2 tables&amp;nbsp;:&lt;/P&gt;&lt;P&gt;1) VW_Dim_Relatie (= clients table)&amp;nbsp;with a column SoortRelatie with values 00010, 00020, V1 and V3.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) VW_Fact_Dekking (= client value tavle) with a column&amp;nbsp;IncassoProvisie_Jr with values that are empty, 0 and up to 10.000.&amp;nbsp; Based on this value I have created band groups connected to a specific value e.g. PB is between 0 and 100, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to add a colum to table VW_Dim_Relatie&amp;nbsp;that is called "Client Segmentation". That needs to give values "0",&amp;nbsp; "PB", "PZ", "PG" for relation type 00010. And values "0", "ZB", "ZZ", "ZG" and "ZP" for relation type 00020. For relation types V1 and V3 it needs to&amp;nbsp;give values "V1" and "V3". If empty&amp;nbsp;field value then it needs to give "no status".&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Find below my DAX SWITCH TRUE () statement. I get message at bottom "the end of this input was reached". Can you please help and guide me what goes wrong here.... Thanks in advance!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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 class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 15:08:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/967078#M11476</guid>
      <dc:creator>DavePBI</dc:creator>
      <dc:date>2020-03-10T15:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: DAX  SWITCH TRUE  - help needed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/967459#M11490</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="207775" data-lia-user-login="DavePBI" class="lia-mention lia-mention-user"&gt;DavePBI&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its because of 2 problem:&lt;/P&gt;
&lt;P&gt;1. delimiters. You should use only ";" or "," depends on locale. I bet ";" in your case will be correct&lt;/P&gt;
&lt;P&gt;2. double [[. use the only [SoortRelatie], not [[SoortRelatie]]&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 19:20:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/967459#M11490</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-03-10T19:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: DAX  SWITCH TRUE  - help needed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/969073#M11534</link>
      <description>&lt;P&gt;Hi az38,&lt;/P&gt;&lt;P&gt;Thanks for getting back to me. Thanks for feedback. I made a mistake on sending incorrect image on that. See below the correct one.&lt;/P&gt;&lt;P&gt;As you can see issue is coming from fact that it cannot find column 'IncassoProvisie_Jr' due to fact that it is a secondary linked table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So to expain further, I have 3 tables in this setting. VW_Dim_Relatie is linked 1 to * with a 2nd table and that second table is linked with also 1 to * connection to the 3rd table VW_Fact_Dekking that holds the column 'IncassoProvisie_Jr'&amp;nbsp;that I need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea to overcome this? Thanks again for feedback.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 13:33:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/969073#M11534</guid>
      <dc:creator>DavePBI</dc:creator>
      <dc:date>2020-03-11T13:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: DAX  SWITCH TRUE  - help needed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/969145#M11536</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="207775" data-lia-user-login="DavePBI" class="lia-mention lia-mention-user"&gt;DavePBI&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue is you have a few related rows from&amp;nbsp;&lt;SPAN&gt;VW_Fact_Dekking table&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So, you have to define logic to what exactly related value you want to use. It can be MAX, MIN, SUM, etc.. or FIRSTNONBLANK.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;for example&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;EK =
var _IncassoProvisie_Jr = CALCULATE(FIRSTNONBLANK(VW_Fact_Dekking[IncassoProvisie_Jr]);1)
RETURN
SWITCH(TRUE();
VW_Dim_Relatie[SoortRelatie] = "00010" &amp;amp;&amp;amp;  _IncassoProvisie_Jr=0; "0";
VW_Dim_Relatie[SoortRelatie] = "00010" &amp;amp;&amp;amp;  _IncassoProvisie_Jr &amp;lt; 100; "PB";
"no_status"
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;or&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;EK =
var _IncassoProvisie_Jr = CALCULATE(MIN(VW_Fact_Dekking[IncassoProvisie_Jr]))
RETURN
SWITCH(TRUE();
VW_Dim_Relatie[SoortRelatie] = "00010" &amp;amp;&amp;amp;  _IncassoProvisie_Jr=0; "0";
VW_Dim_Relatie[SoortRelatie] = "00010" &amp;amp;&amp;amp;  _IncassoProvisie_Jr &amp;lt; 100; "PB";
"no_status"
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 11 Mar 2020 14:13:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/969145#M11536</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-03-11T14:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: DAX  SWITCH TRUE  - help needed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/969403#M11547</link>
      <description>If your table is linked to another via 1:*, then, first of all, there may be many values in the second table for a single row in the first table and secondly, to reach the "many" side of the relationship you have to use RELATEDTABLE.&lt;BR /&gt;&lt;BR /&gt;I'd suggest you think well over again what you want to do because what you are trying to do right now is not doable.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Wed, 11 Mar 2020 16:07:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/969403#M11547</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-11T16:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: DAX  SWITCH TRUE  - help needed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/969434#M11551</link>
      <description>&lt;P&gt;Hi az38,&lt;/P&gt;&lt;P&gt;Thanks so much for that. Really helpfulp it provides no errors anymore&amp;nbsp;and returns the value.&lt;/P&gt;&lt;P&gt;It seems I am almost there, however when checking the label (like PB etc). It seems not to be correct always. Sometimes it should return a PZ but then gives a PG label...&lt;/P&gt;&lt;P&gt;Maybe this comes due to fact that I used SUM in the logic line. I did that as there are in&amp;nbsp;_Incassoprovisie_Jr multiple&amp;nbsp;rows with value&amp;nbsp;within&amp;nbsp;one single&amp;nbsp;Relation, so that is why I took SUM. But maybe that is the issue and I should be usings something else instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again you are of great help....!!!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 16:22:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/969434#M11551</guid>
      <dc:creator>DavePBI</dc:creator>
      <dc:date>2020-03-11T16:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: DAX  SWITCH TRUE  - help needed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/969567#M11555</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="207775" data-lia-user-login="DavePBI" class="lia-mention lia-mention-user"&gt;DavePBI&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it depends on your business logic.&lt;/P&gt;
&lt;P&gt;you should understand what exact value you want to use for define EK for each item.&lt;/P&gt;
&lt;P&gt;maybe AVERAGE(), maybe SUM(). its all about task&lt;/P&gt;
&lt;P&gt;I dont know whats the purpose of your report, what is data nature and so on..&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 17:51:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-SWITCH-TRUE-help-needed/m-p/969567#M11555</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-03-11T17:51:42Z</dc:date>
    </item>
  </channel>
</rss>

