<?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: Switch formula with 2 conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-formula-with-2-conditions/m-p/1576668#M31475</link>
    <description>&lt;P&gt;I meant thursday (I changed all of weekday entries to english) , I used a dax conversion of a date to weekday. I can't supply data, sorry...&lt;/P&gt;</description>
    <pubDate>Thu, 31 Dec 2020 17:08:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-12-31T17:08:14Z</dc:date>
    <item>
      <title>Switch formula with 2 conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-formula-with-2-conditions/m-p/1576641#M31472</link>
      <description>&lt;P&gt;Hello.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The basis of my problem is this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Beginning&lt;/TD&gt;&lt;TD&gt;End&lt;/TD&gt;&lt;TD&gt;Cycle&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Fri&amp;nbsp; 11:00:00&lt;/TD&gt;&lt;TD&gt;Mon 10:59:59&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mon 11:00:00&lt;/TD&gt;&lt;TD&gt;Tue 10:59:59&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Tue 11:00:00&lt;/TD&gt;&lt;TD&gt;Wen 10:59:59&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Wed 11:00:00&lt;/TD&gt;&lt;TD&gt;Thu 10:59:59&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Thu 11:00:00&lt;/TD&gt;&lt;TD&gt;Mon 10:59:59&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each row represent an order, which I have the information of: Payment Date, Number of Articles, Billing Date and So on. I already converted the payment date to a cycle, by following the structure in the table ahead.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I have these columns: [Cycle] (Text), [PaymentWeekDay] (Text), [PaymentDay (only day in date format)]. I need the limit date where each order correspond to a cycle. Example: If an order was payed today (31/12/2020)&amp;nbsp; my limit date is 04/01/2021 - cycle 20.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm following this formula but I still have blanks:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;=SWITCH(TRUE();Table[Cycle]="Cycle 40"&amp;amp;&amp;amp;Table[PaymentWeekDay]="monday";DATEADD(Table[PaymentDay];+2;DAY);[Cycle]="Cycle 40"&amp;amp;&amp;amp;Table[PaymentWeekDay]="tuesday";DATEADD(Table[PaymentDay];+1;DAY);[Cycle]="Cycle 50"&amp;amp;&amp;amp;Table[PaymentWeekDay]="tuesday";DATEADD(Table[PaymentDay];+2;DAY);Table[Cycle]="Cycle 50"&amp;amp;&amp;amp;Table[PaymentWeekDay]="wednesday";DATEADD(Table[PaymentDay];+1;DAY);Table[Cycle]="Cycle 60"&amp;amp;&amp;amp;Table[PaymentWeekDay]="wednesday";DATEADD(Table[PaymentDay];+2;DAY);Table[Cycle]="Cycle 60"&amp;amp;&amp;amp;Table[PaymentWeekDay]="thrusday";DATEADD(Table[PaymentDay];+1;DAY);Table[Cycle]="Cycle 20"&amp;amp;&amp;amp;Table[PaymentWeekDay]="thrusday";DATEADD(Table[PaymentDay];+4;DAY);Table[Cycle]="Cycle 20"&amp;amp;&amp;amp;Table[PaymentWeekDay]="friday";DATEADD(Table[PaymentDay];+3;DAY);Table[Cycle]="Cycle 30"&amp;amp;&amp;amp;Table[PaymentWeekDay]="friday";DATEADD(Table[PaymentDay];+4;DAY);Table[Cycle]="Cycle 30"&amp;amp;&amp;amp;Table[PaymentWeekDay]="saturday";DATEADD(Table[PaymentDay];+3;DAY);Table[Cycle]="Cycle 30"&amp;amp;&amp;amp;Table[PaymentWeekDay]="sunday";DATEADD(Table[PaymentDay];+2;DAY);Table[Cycle]="Cycle 30"&amp;amp;&amp;amp;Table[PaymentWeekDay]="monday";DATEADD(Table[PaymentDay];+1;DAY);0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any Ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 16:15:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-formula-with-2-conditions/m-p/1576641#M31472</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-31T16:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Switch formula with 2 conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-formula-with-2-conditions/m-p/1576665#M31474</link>
      <description>&lt;P&gt;I assume "thrusday"&amp;nbsp; is just a typo?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Generally you will want to have a calendar/dates table in your data model so you can use Time Intelligence DAX functions rather than having to code this all manually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you can supply sample data so we can assist better.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 17:05:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-formula-with-2-conditions/m-p/1576665#M31474</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-12-31T17:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Switch formula with 2 conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-formula-with-2-conditions/m-p/1576668#M31475</link>
      <description>&lt;P&gt;I meant thursday (I changed all of weekday entries to english) , I used a dax conversion of a date to weekday. I can't supply data, sorry...&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 17:08:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-formula-with-2-conditions/m-p/1576668#M31475</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-31T17:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Switch formula with 2 conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-formula-with-2-conditions/m-p/1576674#M31477</link>
      <description>&lt;P&gt;Have a look at the TREATAS() function.&amp;nbsp; It might help you to apply your filters more economically.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 17:22:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-formula-with-2-conditions/m-p/1576674#M31477</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-12-31T17:22:22Z</dc:date>
    </item>
  </channel>
</rss>

