<?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 Applying sort by for a new measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Applying-sort-by-for-a-new-measure/m-p/752962#M2860</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a new measure for my matrix table to replace blanks with 0s.&lt;/P&gt;&lt;P&gt;My table has columns Direction, Date and Category. A new date table was created where date = Distinct([example[Date]).&amp;nbsp;&lt;/P&gt;&lt;P&gt;New measure count category =&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;SWITCH(&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TRUE(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ISBLANK(COUNT(example[Category])), 0,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNT(example[Category])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This measure replaces blanks with 0s. My problem is i am trying to do the same with other columns by creating tables and relationship but the "sort by column" i had previously applied to my columns are not copied onto the new measure i am creating thereby reordering the table.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can someone explain/help me if/why and how to apply sortby option for a new measure.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2019 15:32:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-07-30T15:32:08Z</dc:date>
    <item>
      <title>Applying sort by for a new measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Applying-sort-by-for-a-new-measure/m-p/752962#M2860</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a new measure for my matrix table to replace blanks with 0s.&lt;/P&gt;&lt;P&gt;My table has columns Direction, Date and Category. A new date table was created where date = Distinct([example[Date]).&amp;nbsp;&lt;/P&gt;&lt;P&gt;New measure count category =&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;SWITCH(&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TRUE(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ISBLANK(COUNT(example[Category])), 0,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNT(example[Category])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This measure replaces blanks with 0s. My problem is i am trying to do the same with other columns by creating tables and relationship but the "sort by column" i had previously applied to my columns are not copied onto the new measure i am creating thereby reordering the table.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can someone explain/help me if/why and how to apply sortby option for a new measure.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 15:32:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Applying-sort-by-for-a-new-measure/m-p/752962#M2860</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-30T15:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Applying sort by for a new measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Applying-sort-by-for-a-new-measure/m-p/755908#M2994</link>
      <description>&lt;P&gt;does the sort work if you use&lt;/P&gt;
&lt;PRE&gt;COUNT(example[Category]) + 0&lt;/PRE&gt;
&lt;P&gt;to get rid of blanks? it should also be more performant, as it has no conditionals&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 04:12:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Applying-sort-by-for-a-new-measure/m-p/755908#M2994</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2019-08-02T04:12:01Z</dc:date>
    </item>
  </channel>
</rss>

