<?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 need help building hasonefilter expression to get totals in visual in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/need-help-building-hasonefilter-expression-to-get-totals-in/m-p/2652661#M78265</link>
    <description>&lt;P&gt;I am currently working on a report about the login/logout times of our agents comparing them to the planned shifts. One of the values i have to deliver is an overview of how often they logged in 6 minutes or more after their shift has started.&lt;BR /&gt;&lt;BR /&gt;With help in my last post here I got the formula working to properly show a 1 for every day where they logged in late. (&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculate-how-often-a-threshold-between-two-timestamps-has-been/m-p/2622885#M76485" target="_blank"&gt;Solved: Re: Calculate how often a threshold between two ti... - Microsoft Power BI Community&lt;/A&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;loginCount = 
VAR summaryTable =
    CALCULATETABLE (
        ADDCOLUMNS ( VALUES ( sedShifts[shift] ), "@loginDiff", _calc[loginDiff] ),
        // get difference between shift start and actual login time0
        _date[lastMonth]
            = TRUE () // load all dates from last month
            //_date[date] &amp;gt;= TODAY () - 7
    )
VAR lateTimes =
    COUNTROWS ( FILTER ( summaryTable, [@loginDiff] &amp;gt;= 6 ) ) // count rows with more than 6 minutes late time
RETURN
    lateTimes&lt;/LI-CODE&gt;&lt;P&gt;this results in the following table per agent (ignore the loginWarning)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The Total only shows the last value. I googled the problem and found that I have to use "HASONEFILTER" to get it to create the right value. The Problem is, that I cannot get it to work. I cannot select any of the values in my Formula as the columnname that HASONEFILTER asks for.&lt;BR /&gt;&lt;BR /&gt;I would be very thankful for any pointers on how to build said formula so I get a proper total.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2022 09:57:36 GMT</pubDate>
    <dc:creator>ChromeMystic</dc:creator>
    <dc:date>2022-07-21T09:57:36Z</dc:date>
    <item>
      <title>need help building hasonefilter expression to get totals in visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/need-help-building-hasonefilter-expression-to-get-totals-in/m-p/2652661#M78265</link>
      <description>&lt;P&gt;I am currently working on a report about the login/logout times of our agents comparing them to the planned shifts. One of the values i have to deliver is an overview of how often they logged in 6 minutes or more after their shift has started.&lt;BR /&gt;&lt;BR /&gt;With help in my last post here I got the formula working to properly show a 1 for every day where they logged in late. (&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculate-how-often-a-threshold-between-two-timestamps-has-been/m-p/2622885#M76485" target="_blank"&gt;Solved: Re: Calculate how often a threshold between two ti... - Microsoft Power BI Community&lt;/A&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;loginCount = 
VAR summaryTable =
    CALCULATETABLE (
        ADDCOLUMNS ( VALUES ( sedShifts[shift] ), "@loginDiff", _calc[loginDiff] ),
        // get difference between shift start and actual login time0
        _date[lastMonth]
            = TRUE () // load all dates from last month
            //_date[date] &amp;gt;= TODAY () - 7
    )
VAR lateTimes =
    COUNTROWS ( FILTER ( summaryTable, [@loginDiff] &amp;gt;= 6 ) ) // count rows with more than 6 minutes late time
RETURN
    lateTimes&lt;/LI-CODE&gt;&lt;P&gt;this results in the following table per agent (ignore the loginWarning)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The Total only shows the last value. I googled the problem and found that I have to use "HASONEFILTER" to get it to create the right value. The Problem is, that I cannot get it to work. I cannot select any of the values in my Formula as the columnname that HASONEFILTER asks for.&lt;BR /&gt;&lt;BR /&gt;I would be very thankful for any pointers on how to build said formula so I get a proper total.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 09:57:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/need-help-building-hasonefilter-expression-to-get-totals-in/m-p/2652661#M78265</guid>
      <dc:creator>ChromeMystic</dc:creator>
      <dc:date>2022-07-21T09:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: need help building hasonefilter expression to get totals in visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/need-help-building-hasonefilter-expression-to-get-totals-in/m-p/2657005#M78611</link>
      <description>&lt;P&gt;You need to apply HASONEVALUE to [dateShort].&amp;nbsp;Think like the Grand Total. Very often measures designed for the Grand Total will also work for the Row and Column Totals and for the individual cells.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2022 16:17:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/need-help-building-hasonefilter-expression-to-get-totals-in/m-p/2657005#M78611</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-07-23T16:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: need help building hasonefilter expression to get totals in visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/need-help-building-hasonefilter-expression-to-get-totals-in/m-p/2657863#M78681</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="156080" data-lia-user-login="ChromeMystic" class="lia-mention lia-mention-user"&gt;ChromeMystic&lt;/a&gt;&amp;nbsp;;&lt;/P&gt;
&lt;P&gt;Try it.&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;Newmeasure =
IF (
    ISINSCOPE ( sedShifts[dateshort] ),
    [logincount],
    SUMX ( SUMMARIZE ( 'sedShifts', [dateshort], "1", [logincount] ), [1] )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the above one can't help you get the desired result, please provide some&amp;nbsp;&lt;STRONG&gt;sample data&lt;/STRONG&gt;&amp;nbsp;in your tables (&lt;STRONG&gt;&lt;I&gt;exclude&amp;nbsp;&lt;/I&gt;&lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;sensitive&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;I&gt;data&lt;/I&gt;&lt;/STRONG&gt;) with&amp;nbsp;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with backend logic and special examples.&amp;nbsp;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;pbix file. You can refer the following link to upload the file to the community. Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A tabindex="-1" title="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FDesktop%2FHow-to-upload-PBI-in-Community%2Fm-p%2F1672886&amp;amp;data=04%7C01%7Cv-yiruan%40microsoft.com%7C4f580813734d4a8355b008da16f6e91a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637847547341062885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=YJvujige2YITXKbKED9JieQm5LBdf%2F3IYPM4ggdiijQ%3D&amp;amp;reserved=0" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FDesktop%2FHow-to-upload-PBI-in-Community%2Fm-p%2F1672886&amp;amp;data=04%7C01%7Cv-yiruan%40microsoft.com%7C4f580813734d4a8355b008da16f6e91a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637847547341062885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=YJvujige2YITXKbKED9JieQm5LBdf%2F3IYPM4ggdiijQ%3D&amp;amp;reserved=0" target="_blank" rel="noopener noreferrer" aria-label="Link How to upload PBI in Community"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 02:32:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/need-help-building-hasonefilter-expression-to-get-totals-in/m-p/2657863#M78681</guid>
      <dc:creator>v-yalanwu-msft</dc:creator>
      <dc:date>2022-07-25T02:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: need help building hasonefilter expression to get totals in visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/need-help-building-hasonefilter-expression-to-get-totals-in/m-p/2665372#M79194</link>
      <description>&lt;P&gt;Thanks guys - I was only able to check the replies today but I got correct results now. Not quite as good looking as I want them yet but they work, that is the important thing.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 14:53:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/need-help-building-hasonefilter-expression-to-get-totals-in/m-p/2665372#M79194</guid>
      <dc:creator>ChromeMystic</dc:creator>
      <dc:date>2022-07-27T14:53:12Z</dc:date>
    </item>
  </channel>
</rss>

