<?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 Calculate in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3628877#M140331</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608733" data-lia-user-login="Gazi_Sohan" class="lia-mention lia-mention-user"&gt;Gazi_Sohan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please feel free to let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2024 07:22:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-01-10T07:22:21Z</dc:date>
    <item>
      <title>Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3616411#M139820</link>
      <description>&lt;P&gt;Hi guys, I am trying to calculate Net Income between 2 accounts (account numbers between 400000 and 957090), however I want the account number to come from the columns instead of hard coded. I tried it and got the following exception.&lt;BR /&gt;How can I fix this ?&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;Here is the DAX measure that I am currently using&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Net_income =
CALCULATE(
[Actual Amounts],
// COADetails_New[AccountID] &amp;gt;= "400000" &amp;amp;&amp;amp; COADetails_New[AccountID] &amp;lt;= "957090"
COADetails_New[AccountID] &amp;gt;= 'Balance Sheet Table'[Start Account] &amp;amp;&amp;amp; COADetails_New[AccountID] &amp;lt;= 'Balance Sheet Table'[End Account]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 20:30:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3616411#M139820</guid>
      <dc:creator>Gazi_Sohan</dc:creator>
      <dc:date>2024-01-04T20:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3616446#M139821</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608733" data-lia-user-login="Gazi_Sohan" class="lia-mention lia-mention-user"&gt;Gazi_Sohan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Net_income =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;[Actual Amounts],&lt;BR /&gt;COADetails_New[AccountID]&lt;BR /&gt;&amp;gt;= SELECTEDVALUE ( 'Balance Sheet Table'[Start Account] ) &amp;amp;&amp;amp; COADetails_New[AccountID]&lt;BR /&gt;&amp;lt;= SELECTEDVALUE ( 'Balance Sheet Table'[End Account] )&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 21:00:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3616446#M139821</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2024-01-04T21:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3628877#M140331</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608733" data-lia-user-login="Gazi_Sohan" class="lia-mention lia-mention-user"&gt;Gazi_Sohan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please feel free to let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 07:22:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3628877#M140331</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-10T07:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3631102#M140446</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Sorry for the late reply as I was too busy with loads of projects in my company.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are some corrections that the company has made. So now, instead of the&amp;nbsp;&lt;STRONG&gt;Balance Sheet&lt;/STRONG&gt; table, we are using &lt;STRONG&gt;COADetails_New&lt;/STRONG&gt; table which is connected to the&amp;nbsp;&lt;STRONG&gt;Fact&lt;/STRONG&gt; table directly with a "&lt;EM&gt;One to Many&lt;/EM&gt;" relationship as shown below in the data model -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Also, we have got the DAX measure working but still it has got a hard-coded portion in it in as a filter&lt;BR /&gt;&lt;SPAN&gt;// COADetails_New&lt;/SPAN&gt;&lt;SPAN&gt;[AccountID]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;"400000"&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;COADetails_New&lt;/SPAN&gt;&lt;SPAN&gt;[AccountID]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;"957090"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;See the screenshot below -&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;We don't want this portion to be hard-coded.&lt;BR /&gt;Instead we want to read it from the table itself i.e.&amp;nbsp;&lt;STRONG&gt;COADetails_New&lt;/STRONG&gt; table.&lt;BR /&gt;&lt;BR /&gt;In the &lt;STRONG&gt;COADetails_New&amp;nbsp;&lt;/STRONG&gt;table, here are a snap of the main columns that can be taken into account to perform the required operation&amp;nbsp;-&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;In our current DAX measure we have hard-coded the AccountID for a range &lt;SPAN&gt;between 400000 and 957090 (as mentioned in my first post). Also we don't have the columns &lt;STRONG&gt;Start Account and End Account&lt;/STRONG&gt;&amp;nbsp;in COADetails_New table like we had before in the Balance Sheet table (I mentioned in my first post).&lt;BR /&gt;&lt;BR /&gt;Now, how can I put the range dynamically instead of hard-coding ? Remember, you can't use the&amp;nbsp;&lt;STRONG&gt;totalling&lt;/STRONG&gt; column from COADetails_New table and break it into Start and End account because it remains outdated, the client never updates this.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 17:34:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3631102#M140446</guid>
      <dc:creator>Gazi_Sohan</dc:creator>
      <dc:date>2024-01-10T17:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3632761#M140508</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608733" data-lia-user-login="Gazi_Sohan" class="lia-mention lia-mention-user"&gt;Gazi_Sohan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would you like to dynamically display the ID?&lt;BR /&gt;Is 400000 the minimum value of AccountID column and 957090 the maximum value of AccountID column?&lt;BR /&gt;Then you can use the&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;var _minid= MINX(ALL('COADetails_New'),[AccountID])
VAR _maxid= MAXX(ALL('COADetails_New'),[AccountID])
...
COADetails_New[AccountID] &amp;gt;= __minid &amp;amp;&amp;amp; COADetails_New[AccountID] &amp;lt;= _maxid
...&lt;/LI-CODE&gt;
&lt;P&gt;Or you can create a slicer table.&amp;nbsp;This allows you to manually select the id interval you want.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SlicerTable = VALUES(COADetails_New[AccountID])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;
var _minid= MINX(ALLSELECTED('SlicerTable'),[AccountID])
VAR _maxid= MAXX(ALLSELECTED('SlicerTable'),[AccountID])
...
COADetails_New[AccountID] &amp;gt;= __minid &amp;amp;&amp;amp; COADetails_New[AccountID] &amp;lt;= _maxid
...&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 08:18:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3632761#M140508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-11T08:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3633409#M140530</link>
      <description>&lt;P&gt;Hey&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Answer to your questions -&amp;nbsp;&lt;BR /&gt;1. "&lt;SPAN&gt;&lt;EM&gt;Is 400000 the minimum value of AccountID column and 957090 the maximum value of AccountID column&lt;/EM&gt;?&lt;/SPAN&gt;"&amp;nbsp;&lt;BR /&gt;Ans: No, this is a range of Account ID's particularly for the category &lt;STRONG&gt;"Net Income"&lt;/STRONG&gt; and those range of AccountIDs exist under the AccountID column of COADetails_New table.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Net Income is a summation of all the AccountID's ranging from&amp;nbsp;&lt;STRONG&gt;400000 to 957090 &lt;/STRONG&gt;from COADetails_New[AccountID] column. Now, we have tried to show this by using the DAX measure that I have already shared before which takes the numbers 400000 and 957090 as hard-coded, not dynamically. These Account IDs are present with COADetails_New table.&lt;BR /&gt;&lt;BR /&gt;The word "Net Income" is not present in the COADetails_New table, but from the client's info, we know that AccountIDs raniging between 400000 and 957090 are all part of net income and the summation of the values under all these AccountIDs will give us the value of Net Income.&lt;BR /&gt;&lt;BR /&gt;These accountIDs (400000-957090) are also present in Fact table and as Fact table and COADetails_New table are connected so these range of accounts are pulling the corresponding values from Fact table and then summing up and finally we are getting Net_Income. This is how the DAX measure is working.&lt;BR /&gt;&lt;BR /&gt;The slicer table didn't work because our client don't want any slicer table and then choose. Thanks for keeping me updated.&lt;BR /&gt;&lt;BR /&gt;Gazi&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 16:23:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3633409#M140530</guid>
      <dc:creator>Gazi_Sohan</dc:creator>
      <dc:date>2024-01-12T16:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3635154#M140627</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608733" data-lia-user-login="Gazi_Sohan" class="lia-mention lia-mention-user"&gt;Gazi_Sohan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, Net Income only exists in the Balance table? Then you need to import the Balance table. Then modify the measure as shown below:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;...
var _table=CALCULATETABLE(VALUES('Balance'[AccountID]),'Balance'[ASSETS]="net income")
......
return switch(....
.....
COADetails_New[AccountID] in _table
...&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&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;exclude&amp;nbsp;sensitive&amp;nbsp;data&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.&amp;nbsp;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 07:07:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3635154#M140627</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-12T07:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3636659#M140701</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Let me simplify it for you. Forget about Net Income.&lt;BR /&gt;&lt;BR /&gt;I have a created the DAX measures in which &lt;STRONG&gt;there is a filtering on Account ID column of COADetails table&lt;/STRONG&gt;.&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now the issue is that, in the measure, when I write the Account ID numbers as hardcoded, the measure works, but when I write those dynamically, it doesn't work. To avoid confusion, I have created the same DAX measure twice, one being hardcoded and the other being dynamic -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I am providing the necessary files i.e. the datasource (excel file) and the Power BI report which you will get in the below link -&amp;nbsp;&lt;BR /&gt;&lt;A href="https://drive.google.com/drive/folders/1xDiFgNOm_OpwcqfcgNhInF1homob_suP?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/drive/folders/1xDiFgNOm_OpwcqfcgNhInF1homob_suP?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can you please tell me what am I doing wrong ?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 20:12:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3636659#M140701</guid>
      <dc:creator>Gazi_Sohan</dc:creator>
      <dc:date>2024-01-12T20:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3640331#M140928</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608733" data-lia-user-login="Gazi_Sohan" class="lia-mention lia-mention-user"&gt;Gazi_Sohan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can create two&amp;nbsp;calculated columns on table&amp;nbsp;COA Details.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column 1 = MID([Operator Between Totaling], 1, SEARCH("..", [Operator Between Totaling], , 1) - 1) &lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Column 2 = MID([Operator Between Totaling], SEARCH("..", [Operator Between Totaling], , 1) + 2, LEN([Operator Between Totaling]))&lt;/LI-CODE&gt;
&lt;P&gt;Then we can update the measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dynamic Accounts = 
var selectedrecord = SELECTEDVALUE('COA Summary'[Account ID])
var _Description=SELECTEDVALUE('COA Summary'[Account Description])
var _a=CALCULATE(MAX('COA Details'[Column 1]),FILTER(ALL('COA Details'),'COA Details'[Account Description]=_Description))
var _b=CALCULATE(MAX('COA Details'[Column 2]),FILTER(ALL('COA Details'),'COA Details'[Account Description]=_Description))
var _c=CALCULATE(MAX('COA Details'[Column 1]),FILTER(ALL('COA Details'),'COA Details'[Account Description]=_Description))
var _d=CALCULATE(MAX('COA Details'[Column 2]),FILTER(ALL('COA Details'),'COA Details'[Account Description]=_Description))
RETURN
SWITCH(
    selectedrecord,
    106,
    CALCULATE(
        SUM(Transactions[Amount]),
        ALL('COA Details'),
        'COA Details'[Account ID] &amp;gt;= CONVERT(_a,INTEGER)
        &amp;amp;&amp;amp; 'COA Details'[Account ID] &amp;lt;= CONVERT(_b,INTEGER)
    ),
    206,
    CALCULATE(
        SUM(Transactions[Amount]),
        ALL('COA Details'),
        'COA Details'[Account ID] &amp;gt;= CONVERT(_c,INTEGER)
        &amp;amp;&amp;amp; 'COA Details'[Account ID] &amp;lt;= CONVERT(_d,INTEGER)
    ),
    CALCULATE(
        SUM(Transactions[Amount]),
        'COA Details'[Account ID] &amp;gt;= 'COA Details'[Operator Between Start]
        &amp;amp;&amp;amp; 'COA Details'[Account ID] &amp;lt;= 'COA Details'[Operator Between End]
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 07:15:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3640331#M140928</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-16T07:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3652971#M141518</link>
      <description>&lt;P&gt;Hey&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Sorry for the late reply. I am having heavy loads in my office. Hope you understand !&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We can't use any calculated column because that might increase the model size. The file that we are using currenlty is already huge in size and if we use calculated columns further it might increase the size and refresh time.&lt;BR /&gt;&lt;BR /&gt;Your approach seems to be a reasonable one as far as I can see. Can you please avoid using the calculated columns and then follow the same approach and make it work ?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 03:44:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3652971#M141518</guid>
      <dc:creator>Gazi_Sohan</dc:creator>
      <dc:date>2024-01-23T03:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3653425#M141541</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608733" data-lia-user-login="Gazi_Sohan" class="lia-mention lia-mention-user"&gt;Gazi_Sohan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can create measures.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure 1 = MID(MAX('COA Details'[Operator Between Totaling]), 1, SEARCH("..", MAX('COA Details'[Operator Between Totaling]), , 1) - 1) &lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = MID(MAX('COA Details'[Operator Between Totaling]), SEARCH("..", MAX('COA Details'[Operator Between Totaling]), , 1) + 2, LEN(MAX('COA Details'[Operator Between Totaling])))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Dynamic Accounts = 
var selectedrecord = SELECTEDVALUE('COA Summary'[Account ID])
var _Description=SELECTEDVALUE('COA Summary'[Account Description])
var _a=CALCULATE([Measure 1],FILTER(ALL('COA Details'),'COA Details'[Account Description]=_Description))
var _b=CALCULATE([Measure 2],FILTER(ALL('COA Details'),'COA Details'[Account Description]=_Description))
var _c=CALCULATE([Measure 1],FILTER(ALL('COA Details'),'COA Details'[Account Description]=_Description))
var _d=CALCULATE([Measure 2],FILTER(ALL('COA Details'),'COA Details'[Account Description]=_Description))
RETURN
SWITCH(
    selectedrecord,
    106,
    CALCULATE(
        SUM(Transactions[Amount]),
        ALL('COA Details'),
        'COA Details'[Account ID] &amp;gt;= CONVERT(_a,INTEGER)
        &amp;amp;&amp;amp; 'COA Details'[Account ID] &amp;lt;= CONVERT(_b,INTEGER)
    ),
    206,
    CALCULATE(
        SUM(Transactions[Amount]),
        ALL('COA Details'),
        'COA Details'[Account ID] &amp;gt;= CONVERT(_c,INTEGER)
        &amp;amp;&amp;amp; 'COA Details'[Account ID] &amp;lt;= CONVERT(_d,INTEGER)
    ),
    CALCULATE(
        SUM(Transactions[Amount]),
        'COA Details'[Account ID] &amp;gt;= 'COA Details'[Operator Between Start]
        &amp;amp;&amp;amp; 'COA Details'[Account ID] &amp;lt;= 'COA Details'[Operator Between End]
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 07:56:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3653425#M141541</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-23T07:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3657737#M141725</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I have tested this out.&lt;BR /&gt;&lt;BR /&gt;The surprising thing is that, this solution worked out for the sample file that I have provided, but it's not working in the main file. I exactly don't know the reason why. Let me figure out the reason why your solution is not working in the main file and let me get back to you soon.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 17:11:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3657737#M141725</guid>
      <dc:creator>Gazi_Sohan</dc:creator>
      <dc:date>2024-01-24T17:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Calculate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3663304#M141961</link>
      <description>&lt;P&gt;Hey&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for your solution. Though it's working on the sample file but it didn't work out in our main file.&lt;/P&gt;&lt;P&gt;I have tried my own way by using a pretty simple approach i.e. using&amp;nbsp;&lt;STRONG&gt;selectedvalue&lt;/STRONG&gt; function and it's working perfect in the measure and made it dynamic -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;I have applied the same concept in the sample POC file that I provided for you (attached) -&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;and it's also working fine in the sample file -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But anyway, thanks for your help. I really appreciate it. You are a very talneted guy I must say.&lt;BR /&gt;Hats off&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":collision:"&gt;💥&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;.pbix file with my dynamic measure -&amp;nbsp;&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/1jRhL9q_ytVP4OxSyjntFliLqdm_IXynP/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1jRhL9q_ytVP4OxSyjntFliLqdm_IXynP/view?usp=sharing&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 19:12:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-Calculate/m-p/3663304#M141961</guid>
      <dc:creator>Gazi_Sohan</dc:creator>
      <dc:date>2024-01-26T19:12:27Z</dc:date>
    </item>
  </channel>
</rss>

