<?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: Bucketing values - what is missing? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2421205#M64153</link>
    <description>&lt;P&gt;This is a calculated column right?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Mar 2022 10:25:47 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-03-28T10:25:47Z</dc:date>
    <item>
      <title>Bucketing values - what is missing?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2420926#M64126</link>
      <description>&lt;P&gt;I have written the following Dax, but do not understand what's missing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;Bucket Gross Value =&lt;/P&gt;&lt;P&gt;SWITCH(&lt;/P&gt;&lt;P&gt;TRUE(),&lt;/P&gt;&lt;P&gt;‘Fact’[Gross Value] &amp;nbsp;&amp;lt;=10000,"under 10'000",&lt;/P&gt;&lt;P&gt;‘Fact’[Gross Value] &amp;gt; 10000 &amp;amp;&amp;amp;’Fact’[Gross Value] &amp;lt;=100000,"&amp;lt; $100'000",&lt;/P&gt;&lt;P&gt;‘Fact’[Gross Value] &amp;gt; 100000 &amp;amp;&amp;amp;’Fact’[Gross Value] &amp;lt;=500000,"&amp;lt; $500'000",&lt;/P&gt;&lt;P&gt;‘Fact’[Gross Value] &amp;gt;500000 &amp;amp;&amp;amp;’Fact’[Gross Value] &amp;lt;=1000000,"&amp;lt; $1’000'000",&lt;/P&gt;&lt;P&gt;‘Fact’[Gross Value] &amp;gt;1000000 &amp;amp;&amp;amp;’Fact’[Gross Value] &amp;lt;=500000000,"&amp;lt; $500’000’000",&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;‘Fact’[Gross Value] &amp;gt;500000000 &amp;amp;&amp;amp;’Fact’[Gross Value] &amp;lt;=1000000000,"&amp;lt; $1’000’000’000",&lt;/P&gt;&lt;P&gt;‘Fact’[Gross Value] &amp;gt;1000000000 &amp;amp;&amp;amp;’Fact’[Gross Value] &amp;lt;=50000000000,"&amp;lt; $50’000’000’000","&amp;gt; $50’000’000’000”&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I know there are differnt ways to do it, but I have to do it with a Switch at the moment. It seems as if the else statement is faulty, but I don't see whats wrong.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 28 Mar 2022 08:55:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2420926#M64126</guid>
      <dc:creator>acg</dc:creator>
      <dc:date>2022-03-28T08:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Bucketing values - what is missing?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2421102#M64141</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315639" data-lia-user-login="acg" class="lia-mention lia-mention-user"&gt;acg&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Whats wrong? Do yu recieve error or you get wrong results?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 09:44:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2421102#M64141</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-28T09:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Bucketing values - what is missing?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2421134#M64145</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;tamerj1, it always tries to add another bracket at the end ) and both brackets are in that browish, reddish colour - indicating that it still expects something else.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2420926#" target="_blank" rel="noopener"&gt;PREVIEW&lt;/A&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 28 Mar 2022 09:57:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2421134#M64145</guid>
      <dc:creator>acg</dc:creator>
      <dc:date>2022-03-28T09:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Bucketing values - what is missing?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2421205#M64153</link>
      <description>&lt;P&gt;This is a calculated column right?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 10:25:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2421205#M64153</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-28T10:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Bucketing values - what is missing?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2421217#M64154</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315639" data-lia-user-login="acg" class="lia-mention lia-mention-user"&gt;acg&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the error&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 10:29:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2421217#M64154</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-28T10:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Bucketing values - what is missing?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2421758#M64190</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315639" data-lia-user-login="acg" class="lia-mention lia-mention-user"&gt;acg&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I discovered many sybtax errors inside the code. It seems it was written using a non standard editor. This one should work with no errors&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Bucket Gross Value =
SWITCH (
    TRUE (),
    Fact[Gross Value] &amp;lt;= 10000, "under 10000",
    Fact[Gross Value] &amp;gt; 10000
        &amp;amp;&amp;amp; Fact[Gross Value] &amp;lt;= 100000, "&amp;lt; $100000",
    Fact[Gross Value] &amp;gt; 100000
        &amp;amp;&amp;amp; Fact[Gross Value] &amp;lt;= 500000, "&amp;lt; $500000",
    Fact[Gross Value] &amp;gt; 500000
        &amp;amp;&amp;amp; Fact[Gross Value] &amp;lt;= 1000000, "&amp;lt; $1000000",
    Fact[Gross Value] &amp;gt; 1000000
        &amp;amp;&amp;amp; Fact[Gross Value] &amp;lt;= 500000000, "&amp;lt; $500000000",
    Fact[Gross Value] &amp;gt; 500000000
        &amp;amp;&amp;amp; Fact[Gross Value] &amp;lt;= 1000000000, "&amp;lt; $1000000000",
    Fact[Gross Value] &amp;gt; 1000000000
        &amp;amp;&amp;amp; Fact[Gross Value] &amp;lt;= 50000000000, "&amp;lt; $50000000000",
    "&amp;gt; $50000000000"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 13:54:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2421758#M64190</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-28T13:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Bucketing values - what is missing?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2433884#M64915</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;Thank you very mich for your answer. The "$100'000" act like a text in this context. Therefore, as such the apostrphe can remain.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It turned out the problem was that it was not in direct query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once in direct query ot worked fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Apr 2022 21:21:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bucketing-values-what-is-missing/m-p/2433884#M64915</guid>
      <dc:creator>acg</dc:creator>
      <dc:date>2022-04-03T21:21:41Z</dc:date>
    </item>
  </channel>
</rss>

