<?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: How to set a threshold on number of visible data points in visuals? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2406060#M63165</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Nice! I wasn't using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    ALLSELECTED ()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That actually does what I like to get in the end, but how can I have that threshold inside the DAX instead of "Filters" pane? Tried to use FILTER command but I am doing something wrong.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 21 Mar 2022 08:17:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-03-21T08:17:19Z</dc:date>
    <item>
      <title>How to set a threshold on number of visible data points in visuals?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2402970#M62971</link>
      <description>&lt;P&gt;I have a scatter plot visual and several filter scliers to control what shoud be shown on th visual.&amp;nbsp;&lt;BR /&gt;I have been looking around to find a way to force the visual to show the data, only if there are more than 2 entities (or row of data) available after filtering, and show nothing otherwise. How can such a threshold be set for a visual? I tried to make a measure with a condition on the number of data points using COUNT, but doesn't do anything.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Link to the sample BPIX file:&lt;BR /&gt;&lt;A href="https://tinyurl.com/2p8nb4mc" target="_blank" rel="noopener"&gt;https://tinyurl.com/2p8nb4mc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 10:53:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2402970#M62971</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-18T10:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a threshold on number of visible data points in visuals?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2403378#M63003</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One method is to create a measure that returns the "overall" row count of the DimSalary table using ALLSELECTED, then apply this as a visual level filter.&lt;/P&gt;
&lt;P&gt;In the attached PBIX, I created this measure and added it as a visual level filter "greater than 2".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Salary Row Count Overall = 
CALCULATE (
    COUNTROWS ( DimSalary ),
    ALLSELECTED ()
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this behave has you expected?&lt;/P&gt;
&lt;P&gt;You could solve this with measure(s) as well, but this seems a good enough solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Owen&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 13:27:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2403378#M63003</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2022-03-18T13:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a threshold on number of visible data points in visuals?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2406060#M63165</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Nice! I wasn't using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    ALLSELECTED ()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That actually does what I like to get in the end, but how can I have that threshold inside the DAX instead of "Filters" pane? Tried to use FILTER command but I am doing something wrong.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 08:17:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2406060#M63165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-21T08:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a threshold on number of visible data points in visuals?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2406509#M63204</link>
      <description>&lt;P&gt;No worries &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To capture the logic in a measure instead, I would write something like this, and place it in the Size field well, keeping the existing X &amp;amp; Y Axis fields:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Salary Count if above threshold = 
VAR Threshold = 2
VAR SalaryRowCountOverall =
    CALCULATE (
        COUNTROWS ( DimSalary ),
        ALLSELECTED ()
    )
RETURN
    IF (
        SalaryRowCountOverall &amp;gt; Threshold,
        COUNTROWS ( DimSalary )
    )&lt;/LI-CODE&gt;
&lt;P&gt;This measure will give you larger dots if multiple employees have the same salary/year combination (such as Year 2000 Salary 1,500 in the sample data).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could force the dots to the same size if you wanted:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Salary Indicator if above threshold = 
-- Return 1 if "ALLSELECTED" count of DimSalary rows &amp;gt; threshold
-- and at least one salary exists in current filter context
-- Otherwise BLANK
VAR Threshold = 2
VAR SalaryRowCountOverall =
    CALCULATE (
        COUNTROWS ( DimSalary ),
        ALLSELECTED ()
    )
RETURN
    IF (
        SalaryRowCountOverall &amp;gt; Threshold,
        VAR SalaryRows =
            COUNTROWS ( DimSalary )
        RETURN
            DIVIDE ( SalaryRows, SalaryRows )
            -- See https://www.sqlbi.com/articles/how-to-return-blank-instead-of-zero/
    )&lt;/LI-CODE&gt;
&lt;P&gt;PBIX attached.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Owen&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 11:01:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2406509#M63204</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2022-03-21T11:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a threshold on number of visible data points in visuals?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2408817#M63343</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Wow, thanks! That also actually works. I like to keep the size constant.&lt;BR /&gt;There is just one issue though: It is not possible to add the trendlines under the Analytics tab anymore. Is there a way to add trendlines to the scatter plot you made?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 08:38:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2408817#M63343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-22T08:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a threshold on number of visible data points in visuals?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2410790#M63503</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Sure, to get the trend line working, it appears you can't have a Size field on the visual.&lt;/P&gt;
&lt;P&gt;We can take a different approach instead:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create measures &lt;STRONG&gt;Salary Filtered&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;EducationYear Filtered&lt;/STRONG&gt; which return blank if there are too few data points.&lt;/LI&gt;
&lt;LI&gt;Place these measures on X &amp;amp; Y axes&lt;/LI&gt;
&lt;LI&gt;Place &lt;STRONG&gt;DimEmployees1[EmployeeID]&lt;/STRONG&gt; as the Values field.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;To define the above measures, I also created a helper measure &lt;STRONG&gt;Is Salary Count above threshold.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;So the measures are:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Is Salary Count above threshold = 
VAR Threshold = 2
VAR SalaryRowCountOverall =
    CALCULATE (
        COUNTROWS ( DimSalary ),
        ALLSELECTED ()
    )
RETURN
    SalaryRowCountOverall &amp;gt; Threshold&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;EducationYear Filtered = 
IF (
    [Is Salary Count above threshold],
    AVERAGE ( DimEmployees1[EducationYear] ) -- Could use SELECTEDVALUE if assume single value
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Salary Filtered = 
IF (
    [Is Salary Count above threshold],
    AVERAGE ( DimSalary[Salary] ) -- Could use SELECTEDVALUE if assume single value
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In reality, it is sufficient to apply filtering logic to just one of the X or Y axis measures, but we can apply it to both for completeness.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Updated PBIX attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Owen&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 00:02:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2410790#M63503</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2022-03-23T00:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a threshold on number of visible data points in visuals?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2411455#M63532</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Amazing! This also works well.&lt;BR /&gt;One last thing: Is there a way to hide the Employee ID from the tooltip, other than turning the whole tooltip off?&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 07:25:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2411455#M63532</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-23T07:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a threshold on number of visible data points in visuals?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2413389#M63674</link>
      <description>&lt;P&gt;That's great &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;The reason for placing EmployeeID in "Values" was to ensure we had one data point per EmployeeID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some options I can think of to get ride of EmployeeID, depending on exactly how you want things to look:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a Report Page tooltip instead which can be customized however you like.&lt;/LI&gt;
&lt;LI&gt;Instead of placing EmployeeID in "Values", place EducationYear and Salary instead, then click the "expand all down one level" button on the visual.&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;This results in one data point per EducationYear/Salary combination.&lt;BR /&gt;
&lt;P&gt;However, the tooltips will appear like this, which might not be desirable (fields can be renamed though).&lt;/P&gt;
&lt;img /&gt;&lt;/LI&gt;
&lt;LI&gt;Create some other arbitrary ID that has a 1:1 relationship with EmployeeID and use it instead.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;One thing to note is that you can get a slightly different trend line if you have one data point per Salary/EducationYear combination compared with one data point per EmployeeID (due to duplicates).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Updated PBIX attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Owen &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 20:36:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2413389#M63674</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2022-03-23T20:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a threshold on number of visible data points in visuals?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2413487#M63680</link>
      <description>&lt;P&gt;Thanks! You are a genius! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 21:39:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-a-threshold-on-number-of-visible-data-points-in/m-p/2413487#M63680</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-23T21:39:57Z</dc:date>
    </item>
  </channel>
</rss>

