<?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: USERELATIONSHIP &amp;amp; Convert BLANKS to 0 in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/USERELATIONSHIP-amp-Convert-BLANKS-to-0/m-p/2763013#M25781</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="439641" data-lia-user-login="apuype" class="lia-mention lia-mention-user"&gt;apuype&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whether the advice given by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp; has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Looking forward to your feedback.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Henry&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2022 02:48:14 GMT</pubDate>
    <dc:creator>v-henryk-mstf</dc:creator>
    <dc:date>2022-09-13T02:48:14Z</dc:date>
    <item>
      <title>USERELATIONSHIP &amp; Convert BLANKS to 0</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/USERELATIONSHIP-amp-Convert-BLANKS-to-0/m-p/2758175#M25721</link>
      <description>&lt;P&gt;Hello All! Looking for some guidance on converting blanks to 0 within a measure that also uses the USERELATIONSHIP function. My regular ways do not seem to work with this.&lt;BR /&gt;&lt;BR /&gt;My "master measure" as I call it starts with the relationship function - this count keeps 0's as blanks but I require the 0. I use the master within the custom date period measures&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Order&lt;/SPAN&gt; &lt;SPAN&gt;Count&lt;/SPAN&gt; Dispatch User =&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;/FONT&gt; &lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color="#3366FF"&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;/FONT&gt; &lt;SPAN&gt;(&lt;/SPAN&gt; &lt;SPAN&gt;'Executive_Reporting'[Order_Id]&lt;/SPAN&gt; &lt;SPAN&gt;)&lt;/SPAN&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color="#3366FF"&gt;&lt;SPAN&gt;USERELATIONSHIP&lt;/SPAN&gt;&lt;/FONT&gt; &lt;SPAN&gt;(&lt;/SPAN&gt; &lt;SPAN&gt;Executive_Reporting[dispatcher_user_id]&lt;/SPAN&gt;, &lt;SPAN&gt;'Master -&amp;nbsp;&amp;nbsp;User ID'[User ID]&lt;/SPAN&gt;&amp;nbsp;))&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;To encorporate into our custom date periods I then move to this measure&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Order Count Dispatched By Current Week CY =&lt;BR /&gt;VAR&lt;FONT color="#33CCCC"&gt; CurrentWeek&lt;/FONT&gt; = &lt;FONT color="#3366FF"&gt;SELECTEDVALUE&lt;/FONT&gt; ( 'Dim_Date'[SLUSAWeekNum] )&lt;BR /&gt;VAR &lt;FONT color="#33CCCC"&gt;CurrentYear&lt;/FONT&gt; = &lt;FONT color="#3366FF"&gt;SELECTEDVALUE&lt;/FONT&gt; ( 'Dim_Date'[SLUSAYearNum] )&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000080"&gt;RETURN&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color="#3366FF"&gt;IF &lt;/FONT&gt;(&lt;FONT color="#3366FF"&gt;HASONEVALUE&lt;/FONT&gt; ( Dim_Date[SLUSAWeekNum] ),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color="#3366FF"&gt;SUMX&lt;/FONT&gt; (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color="#3366FF"&gt;FILTER&lt;/FONT&gt; (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color="#3366FF"&gt;ALL&lt;/FONT&gt; ( Dim_Date ),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim_Date[SLUSAWeekNum] = &lt;FONT color="#33CCCC"&gt;CurrentWeek&amp;nbsp;&lt;/FONT&gt;&amp;amp;&amp;amp; Dim_Date[SLUSAYearNum] = &lt;FONT color="#33CCCC"&gt;CurrentYear&lt;/FONT&gt;),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color="#800080"&gt;[Order Count Dispatch User]&lt;/FONT&gt;),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color="#3366FF"&gt;BLANK&lt;/FONT&gt; ())&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;You can see when brought into the table that the blanks then don't allow the calculations to work and show the proper change over prior week&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;Any help would be appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 12:29:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/USERELATIONSHIP-amp-Convert-BLANKS-to-0/m-p/2758175#M25721</guid>
      <dc:creator>apuype</dc:creator>
      <dc:date>2022-09-09T12:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: USERELATIONSHIP &amp; Convert BLANKS to 0</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/USERELATIONSHIP-amp-Convert-BLANKS-to-0/m-p/2760456#M25749</link>
      <description>&lt;P&gt;You have a couple of options. My preference is COALESCE but you can also add 0 to a measure that you supsect might return BLANK()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One slightly unrelated note:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IF (HASONEVALUE ( Dim_Date[SLUSAWeekNum] ),
        SUMX (
            FILTER (
                ALL ( Dim_Date ),
                Dim_Date[SLUSAWeekNum] = CurrentWeek &amp;amp;&amp;amp; Dim_Date[SLUSAYearNum] = CurrentYear),
            [Order Count Dispatch User]),
        BLANK ())&lt;/LI-CODE&gt;
&lt;P&gt;doesn't really need the "Else" statement as BLANK is implied.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2022 18:04:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/USERELATIONSHIP-amp-Convert-BLANKS-to-0/m-p/2760456#M25749</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-09-11T18:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: USERELATIONSHIP &amp; Convert BLANKS to 0</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/USERELATIONSHIP-amp-Convert-BLANKS-to-0/m-p/2761905#M25768</link>
      <description>&lt;P&gt;Thank you, I have not worked with COALESCE before - glad to learn new functions! I gave it a shot in my first measure - it worked in subbing the blanks for 0's but seemed to break the USERELATIONSHIP piece. That function seems to be a picky one in terms of what it works well with.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I did previously try adding 0 to all versions of the measure but again it then looses the relationship piece.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have since created a measure summing my two columns and excluding the sums of 0. Not exactly the way I wanted to go around it but seems to be working for this purpose.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you again for your help! Going to play with COALESCE some more for future measures. Also agreed on your else remark - I keep the same format for a bunch of measures as we use alot of custom date periods so sometimes it applies and sometimes not so I didn't even notice it there. Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 12:42:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/USERELATIONSHIP-amp-Convert-BLANKS-to-0/m-p/2761905#M25768</guid>
      <dc:creator>apuype</dc:creator>
      <dc:date>2022-09-12T12:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: USERELATIONSHIP &amp; Convert BLANKS to 0</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/USERELATIONSHIP-amp-Convert-BLANKS-to-0/m-p/2763013#M25781</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="439641" data-lia-user-login="apuype" class="lia-mention lia-mention-user"&gt;apuype&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whether the advice given by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp; has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Looking forward to your feedback.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Henry&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 02:48:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/USERELATIONSHIP-amp-Convert-BLANKS-to-0/m-p/2763013#M25781</guid>
      <dc:creator>v-henryk-mstf</dc:creator>
      <dc:date>2022-09-13T02:48:14Z</dc:date>
    </item>
  </channel>
</rss>

