<?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: Having some issues with a DAX measure for SLA with True and False in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951768#M10710</link>
    <description>&lt;P&gt;Right, the issue with COUNT was not the same error. You need to use COUNTA to count boolean columns instead of COUNT, or COUNTROWS works as well.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2020 21:53:13 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2020-02-27T21:53:13Z</dc:date>
    <item>
      <title>Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951537#M10693</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I'm having a DAX error about calculating SLA based on True/False values (meaning the percentage of those that met SLA). This seems fairly simple but I receive the following using this data and the following for a measure I created called sla_percent&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sla_percent = CALCULATE(COUNT('ServiceNow Incident Data'[target_sla]), 'ServiceNow Incident Data'[target_sla] = "True") / CALCULATE(COUNT('ServiceNow Incident Data'[target_sla]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thoughts anyone on why I receive this error and what I might be able to do to remedy it?&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&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 19:09:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951537#M10693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T19:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951566#M10694</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;looks pretty easy - you are trying to compare Boolean field&amp;nbsp;[target_sla] with text string "True". Use TRUE(), like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;sla_percent = CALCULATE(COUNT('ServiceNow Incident Data'[target_sla]), 'ServiceNow Incident Data'[target_sla] = TRUE()) / CALCULATE(COUNT('ServiceNow Incident Data'[target_sla]))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 19:30:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951566#M10694</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-02-27T19:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951571#M10695</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;sla_percent = CALCULATE(COUNT('ServiceNow Incident Data'[target_sla]), 'ServiceNow Incident Data'[target_sla] = TRUE()) / CALCULATE(COUNT('ServiceNow Incident Data'[target_sla]))&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Feb 2020 19:32:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951571#M10695</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-02-27T19:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951670#M10702</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;- I was just trying a similar but with Filter - which didn't work. Let me give this one a try and I'll let you know how it works in a few.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 20:48:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951670#M10702</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T20:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951674#M10703</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82403" data-lia-user-login="az38" class="lia-mention lia-mention-user"&gt;az38&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;The referenced DAX did not work, it has the same error as I used with Filter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following is shown&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 20:53:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951674#M10703</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T20:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951681#M10705</link>
      <description>Anonymous&lt;/a&gt;&lt;BR /&gt;Try COUNTROWS(), not count&lt;BR /&gt;&lt;BR /&gt;sla_percent = CALCULATE(COUNTROWS('ServiceNow Incident Data'), 'ServiceNow Incident Data'[target_sla] = TRUE()) / CALCULATE(COUNTROWS ('ServiceNow Incident Data'))&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Feb 2020 20:57:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951681#M10705</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-02-27T20:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951703#M10706</link>
      <description>&lt;P&gt;Well, I tried two different things but I do at least get a number value but only the value of "1".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried at first to use filter and set data type to Text instead which produced a value of "1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did the same as recommended with count rows and I also get "1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would think this would be a far larger number (less than 100 of course) as I have almost 5000 records and true is present in at least half of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82403" data-lia-user-login="az38" class="lia-mention lia-mention-user"&gt;az38&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 21:09:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951703#M10706</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T21:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951714#M10707</link>
      <description>Anonymous&lt;/a&gt;&lt;BR /&gt;It looks like format issue&lt;BR /&gt;Pick your measure in right lane, go to the Modeling ribbon and press % and set 2 as decimal places</description>
      <pubDate>Thu, 27 Feb 2020 21:18:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951714#M10707</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-02-27T21:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951739#M10709</link>
      <description>&lt;P&gt;Hmm.. I was just speaking with a collegue on this. The logic seems right and I know there are False values in there because I can filter on them manually. I can assure you though that it's not 1% or 100% - let me post both values and the actual counts for what we know the number should be. I do agree, this should be simple...&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 21:36:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951739#M10709</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T21:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951768#M10710</link>
      <description>&lt;P&gt;Right, the issue with COUNT was not the same error. You need to use COUNTA to count boolean columns instead of COUNT, or COUNTROWS works as well.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 21:53:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951768#M10710</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-02-27T21:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951800#M10712</link>
      <description>&lt;P&gt;&lt;img /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sla_percent = CALCULATE(COUNTA('ServiceNow Incident Data'[target_sla]), 'ServiceNow Incident Data'[target_sla] = "TRUE") / CALCULATE(COUNTA('ServiceNow Incident Data'[number]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the values set to Text in this case. Of 4587 rows, I have 1647 listed as False. I also did a sample test with just a tiny table of four rows and one column, even added another called ID with values 1-4 that looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;target_sla &amp;nbsp; id&lt;/P&gt;&lt;P&gt;TRUE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;TRUE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;FALSE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;&lt;P&gt;TRUE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clearly this value should be 0.75 or 75% but when I just drag them to a new table visualization, they show distinct values of only true/false. I have a feeling this is the root of the cause as my actual data is very similar. This is most baffling for what appears to be simple and correct logic.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 22:29:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/951800#M10712</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T22:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/953752#M10824</link>
      <description>&lt;LI-CODE lang="markup"&gt;sla_percent =
DIVIDE (
	CALCULATE (
	    COUNTROWS ( 'ServiceNow Incident Data' ),
	    // This column must be a BOOLEAN column.
	    // Otherwise it'll not work.
	    KEEPFILTERS ( 'ServiceNow Incident Data'[target_sla] )
	),
    COUNTROWS ( 'ServiceNow Incident Data' )
)&lt;/LI-CODE&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Sat, 29 Feb 2020 12:28:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/953752#M10824</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-29T12:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/955440#M10927</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82403" data-lia-user-login="az38" class="lia-mention lia-mention-user"&gt;az38&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok, so I now I think I see your perspective and what may be missing from this discussion. It appears that when I use a blank table with a test row labed the same and the forementioned DAX faunctions, I get the expected result. I can see why people think I'm not doing something right. I also used the latest and it too returns a result correct in my test table but not in my data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a feeling this is the result of the target_sla column being performed by a conditional column, which has logic based on a previous custom column, which calculates duration from the difference of two columns. It seems that all of these provide the value of one when used in that context, which may explain that perhaps only one value is shown. I'm going to give everyone a test PBIX file to view in a few minutes which will explain this vs the test tables.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 15:21:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/955440#M10927</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-02T15:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Having some issues with a DAX measure for SLA with True and False</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/955605#M10942</link>
      <description>&lt;P&gt;I feel very dumb on this one. Turns out the reason it would never work is that I had a time filter being applied to just that one visual. Another intresting note is that the COUNTROWS posted earlier seems to work best. Thank you everyone for awesome assistance!~&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 16:51:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Having-some-issues-with-a-DAX-measure-for-SLA-with-True-and/m-p/955605#M10942</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-02T16:51:17Z</dc:date>
    </item>
  </channel>
</rss>

