<?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: Trying to display suspicious entries. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-display-suspicious-entries/m-p/1182324#M18482</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;alertFlag =
VAR _course =
    CALCULATE ( SELECTEDVALUE ( entries[course] ) )
VAR _maxDate =
    CALCULATE (
        MAX ( entries[Entry date] ),
        FILTER ( ALL ( entries ), entries[course] = _course )
    )
VAR _maxDatePrevEntry =
    CALCULATE (
        MAX ( entries[Entry date] ),
        FILTER (
            ALL ( entries ),
            entries[course] = _course
                &amp;amp;&amp;amp; entries[Entry date] &amp;lt; _maxDate
        )
    )
VAR _difference =
    CALCULATE (
        MAX ( entries[percentage] ),
        FILTER (
            ALL ( entries ),
            entries[course] = _course
                &amp;amp;&amp;amp; entries[Entry date] = _maxDate
        )
    )
        - CALCULATE (
            MAX ( entries[percentage] ),
            FILTER (
                ALL ( entries ),
                entries[course] = _course
                    &amp;amp;&amp;amp; entries[Entry date] = _maxDatePrevEntry
            )
        )
RETURN
    SWITCH (
        TRUE (),
        entries[course] = _course
            &amp;amp;&amp;amp; entries[Entry date] = _maxDate
            &amp;amp;&amp;amp; _difference &amp;lt; 0, "Alert",
        _maxDate - _maxDatePrevEntry &amp;gt; 14
            &amp;amp;&amp;amp; entries[Entry date] = _maxDate
            &amp;amp;&amp;amp; _difference = 0, "Alert",
        BLANK ()
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;BR /&gt;Sturla&lt;BR /&gt;&lt;BR /&gt;If this post helps, then please consider Accepting it as the solution. Kudos are nice too.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jun 2020 12:14:19 GMT</pubDate>
    <dc:creator>sturlaws</dc:creator>
    <dc:date>2020-06-25T12:14:19Z</dc:date>
    <item>
      <title>Trying to display suspicious entries.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-display-suspicious-entries/m-p/1166415#M17921</link>
      <description>&lt;P&gt;I am trying to make the visualization for trainning entries. The information are pretty strightforward here are the lists of available columns.&lt;BR /&gt;&lt;BR /&gt;Table1&lt;BR /&gt;&lt;STRONG&gt;[Entry Date]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Course Name]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Percentage]&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Eg.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;[Entry Date]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[Course Name]&amp;nbsp; &amp;nbsp; [Percentage]&lt;/STRONG&gt;&lt;BR /&gt;01/01/2000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Database&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 50%&lt;BR /&gt;02/01/2000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Database&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 70%&lt;BR /&gt;03/01/2000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Database&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30%&lt;BR /&gt;&lt;BR /&gt;As can be seen above I wanna display like a warning message on some visuals on entries that the percentage decrease. Or in another case if someone submit an entry with 99% and forgot to submit another one with 100% for over two weeks that will also be a warning message.&lt;BR /&gt;&lt;BR /&gt;Thank you everyone in advance&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 14:54:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-display-suspicious-entries/m-p/1166415#M17921</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-17T14:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to display suspicious entries.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-display-suspicious-entries/m-p/1182324#M18482</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;alertFlag =
VAR _course =
    CALCULATE ( SELECTEDVALUE ( entries[course] ) )
VAR _maxDate =
    CALCULATE (
        MAX ( entries[Entry date] ),
        FILTER ( ALL ( entries ), entries[course] = _course )
    )
VAR _maxDatePrevEntry =
    CALCULATE (
        MAX ( entries[Entry date] ),
        FILTER (
            ALL ( entries ),
            entries[course] = _course
                &amp;amp;&amp;amp; entries[Entry date] &amp;lt; _maxDate
        )
    )
VAR _difference =
    CALCULATE (
        MAX ( entries[percentage] ),
        FILTER (
            ALL ( entries ),
            entries[course] = _course
                &amp;amp;&amp;amp; entries[Entry date] = _maxDate
        )
    )
        - CALCULATE (
            MAX ( entries[percentage] ),
            FILTER (
                ALL ( entries ),
                entries[course] = _course
                    &amp;amp;&amp;amp; entries[Entry date] = _maxDatePrevEntry
            )
        )
RETURN
    SWITCH (
        TRUE (),
        entries[course] = _course
            &amp;amp;&amp;amp; entries[Entry date] = _maxDate
            &amp;amp;&amp;amp; _difference &amp;lt; 0, "Alert",
        _maxDate - _maxDatePrevEntry &amp;gt; 14
            &amp;amp;&amp;amp; entries[Entry date] = _maxDate
            &amp;amp;&amp;amp; _difference = 0, "Alert",
        BLANK ()
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;BR /&gt;Sturla&lt;BR /&gt;&lt;BR /&gt;If this post helps, then please consider Accepting it as the solution. Kudos are nice too.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 12:14:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-display-suspicious-entries/m-p/1182324#M18482</guid>
      <dc:creator>sturlaws</dc:creator>
      <dc:date>2020-06-25T12:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to display suspicious entries.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-display-suspicious-entries/m-p/1184679#M18580</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="88633" data-lia-user-login="sturlaws" class="lia-mention lia-mention-user"&gt;sturlaws&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;It seems like on the switch it can only use measure and not a comlumn because the column name [Coursekey] inside table [Training] cann't be specified.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 09:25:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-display-suspicious-entries/m-p/1184679#M18580</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-26T09:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to display suspicious entries.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-display-suspicious-entries/m-p/1184828#M18584</link>
      <description>&lt;P&gt;sorry, forgot to mention that this is the code for a calculated column&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 10:28:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-display-suspicious-entries/m-p/1184828#M18584</guid>
      <dc:creator>sturlaws</dc:creator>
      <dc:date>2020-06-26T10:28:26Z</dc:date>
    </item>
  </channel>
</rss>

