<?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: Need help with a dax query in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-a-dax-query/m-p/1060036#M14701</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="178103" data-lia-user-login="Taniya" class="lia-mention lia-mention-user"&gt;Taniya&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To perform any aggregrate function using group by, you need to use CURRENTGROUP(). I do not see you using this anywhere in you formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check this article&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/nested-grouping-using-groupby-vs-summarize/" target="_blank"&gt;https://www.sqlbi.com/articles/nested-grouping-using-groupby-vs-summarize/&lt;/A&gt;&lt;/P&gt;&lt;DIV class="line number15 index14 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;Also, please have a look at the below video.&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&lt;A href="https://curbal.com/blog/glossary/groupby-dax-example" target="_blank"&gt;https://curbal.com/blog/glossary/groupby-dax-example&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;It is very diffcult to follow you question. Please share some sample data to help you further on this.&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;Regards,&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;Harsh Nathani&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Thu, 30 Apr 2020 21:11:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-04-30T21:11:57Z</dc:date>
    <item>
      <title>Need help with a dax query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-a-dax-query/m-p/1059803#M14679</link>
      <description>&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Hi&lt;BR /&gt;So below is the screenshot of Rref(Risk reference ),qref(quote reference),start date,end date and annual gross premium(which we need to calculate). What we have achieved correctly is annual gross premium column but what not is the summation it is providing. As you see Rref is same in all cases so for a particular Rref and its dintinct Qref we want only annual gross premium whose start date is latest among the two same qref for a risk in that club year .&amp;nbsp;&lt;BR /&gt;Ex for 2017 annula gross premium &amp;nbsp;should be 10000,for 2018 it will be 10000 for 2019 = 9986.33 ,for 2020 =9986.33,for 2021 = 9986.33. sos alltogether it should be 49958.99 but what we are getting as total is 29.986.33.&lt;BR /&gt;DAX for what we have achieved so far is also attached below -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Annual Gross perm = IF([Distinct Count]=2,&lt;/P&gt;&lt;P&gt;SUMX(&lt;/P&gt;&lt;P&gt;FILTER(&lt;/P&gt;&lt;P&gt;GROUPBY( 'Club Year Data','Club Year Data'[Rref],'Club Year Data'[Qref],'Club Year Data'[spl_stagingid], 'Club Year Data'[spl_perdaygrossperm],'Club Year Data'[productname],'Club Year Data'[spl_startdate],'Club Year Data'[Trim name]),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECTEDVALUE('Club Year Data'[Club Year])=YEAR('Club Year Data'[spl_startdate])),&lt;/P&gt;&lt;P&gt;'Club Year Data'[spl_perdaygrossperm]*365),&lt;/P&gt;&lt;P&gt;SUMX( GROUPBY( 'Club Year Data','Club Year Data'[Rref],'Club Year Data'[Qref],'Club Year Data'[spl_stagingid], 'Club Year Data'[spl_perdaygrossperm],'Club Year Data'[productname],'Club Year Data'[Trim name]),&lt;/P&gt;&lt;P&gt;'Club Year Data'[spl_perdaygrossperm]*365) )&lt;BR /&gt;Please Note - Distint Count=DISTINCTCOUNT(Club Year Data[qref]) and Trim name is the name of broker&lt;BR /&gt;Please help me with this.&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 17:38:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-a-dax-query/m-p/1059803#M14679</guid>
      <dc:creator>Taniya</dc:creator>
      <dc:date>2020-04-30T17:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a dax query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-a-dax-query/m-p/1060036#M14701</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="178103" data-lia-user-login="Taniya" class="lia-mention lia-mention-user"&gt;Taniya&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To perform any aggregrate function using group by, you need to use CURRENTGROUP(). I do not see you using this anywhere in you formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check this article&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/nested-grouping-using-groupby-vs-summarize/" target="_blank"&gt;https://www.sqlbi.com/articles/nested-grouping-using-groupby-vs-summarize/&lt;/A&gt;&lt;/P&gt;&lt;DIV class="line number15 index14 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;Also, please have a look at the below video.&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&lt;A href="https://curbal.com/blog/glossary/groupby-dax-example" target="_blank"&gt;https://curbal.com/blog/glossary/groupby-dax-example&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;It is very diffcult to follow you question. Please share some sample data to help you further on this.&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;Regards,&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;Harsh Nathani&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Apr 2020 21:11:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-a-dax-query/m-p/1060036#M14701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-30T21:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a dax query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-a-dax-query/m-p/1060406#M14730</link>
      <description>&lt;P&gt;is q1 and q2 are two quotes attaches to the same risk and if end date of q1 =start date of q2 then only consider that date for q2 i.e the latest quote&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 04:38:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-a-dax-query/m-p/1060406#M14730</guid>
      <dc:creator>Taniya</dc:creator>
      <dc:date>2020-05-01T04:38:21Z</dc:date>
    </item>
  </channel>
</rss>

