<?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 Interaction causes invalid calculation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Interaction-causes-invalid-calculation/m-p/1142868#M17148</link>
    <description>&lt;P&gt;Somehow when I'm clicking on bars it messes up my % calculation. Do I need to alter the calcuation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I've done:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Created custom column to determine if a claim is electronic or paper using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Claim Type&lt;/STRONG&gt; =if[#" Process ERA"] = "No" and [#" Process Paper"] = "No" and [#" Payer Name"]&amp;lt;&amp;gt;"PATPAY" then "Paper" else "Electronic"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then created a measure to determine what % of claims are electronic&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;% Electronic&lt;/STRONG&gt;= CALCULATE(SUM('Table'[ Claim Count]),'Table'[Claim Type]="Electronic")/CALCULATE(SUM('Table'[ Claim Count]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I then created a table showing % of electronic and total number of claims by client. I also created a side by side bar chart showing paper vs electronic by month.&amp;nbsp; If I click on the bar that represents Paper claims for any of those months I get a % greater than 100 which is not possible.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I broke out the calculation above to get just electonic count and total count.&amp;nbsp; As you can see electronic is 703,000 while total is 206,000. I also included a row of data to show how the data is coming in.&amp;nbsp; It seems like the date interaction is causing issues for some reason because the calculation works fine when i dont click on the bars.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 04 Jun 2020 21:32:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-06-04T21:32:45Z</dc:date>
    <item>
      <title>Interaction causes invalid calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Interaction-causes-invalid-calculation/m-p/1142868#M17148</link>
      <description>&lt;P&gt;Somehow when I'm clicking on bars it messes up my % calculation. Do I need to alter the calcuation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I've done:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Created custom column to determine if a claim is electronic or paper using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Claim Type&lt;/STRONG&gt; =if[#" Process ERA"] = "No" and [#" Process Paper"] = "No" and [#" Payer Name"]&amp;lt;&amp;gt;"PATPAY" then "Paper" else "Electronic"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then created a measure to determine what % of claims are electronic&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;% Electronic&lt;/STRONG&gt;= CALCULATE(SUM('Table'[ Claim Count]),'Table'[Claim Type]="Electronic")/CALCULATE(SUM('Table'[ Claim Count]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I then created a table showing % of electronic and total number of claims by client. I also created a side by side bar chart showing paper vs electronic by month.&amp;nbsp; If I click on the bar that represents Paper claims for any of those months I get a % greater than 100 which is not possible.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I broke out the calculation above to get just electonic count and total count.&amp;nbsp; As you can see electronic is 703,000 while total is 206,000. I also included a row of data to show how the data is coming in.&amp;nbsp; It seems like the date interaction is causing issues for some reason because the calculation works fine when i dont click on the bars.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 04 Jun 2020 21:32:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Interaction-causes-invalid-calculation/m-p/1142868#M17148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-04T21:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Interaction causes invalid calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Interaction-causes-invalid-calculation/m-p/1143343#M17164</link>
      <description>&lt;P&gt;Since the counts are off after slicing it shows that it's not the calculation. Can't be the calculated column. Best to slice to a small selection and try to understand why these rows remain after slicing.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 04:32:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Interaction-causes-invalid-calculation/m-p/1143343#M17164</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-05T04:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Interaction causes invalid calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Interaction-causes-invalid-calculation/m-p/1146040#M17308</link>
      <description>&lt;LI-CODE lang="csharp"&gt;[Total Claims] = SUM ( 'Table'[ Claim Count] )

[% Electronic] =
var __electronicClaims =
	CALCULATE ( 
		[Total Claims],
		KEEPFILTERS(
			'Table'[Claim Type] = "Electronic"
		)
	)
var __totalClaims = [Total Claims]
return
	DIVIDE(
		__electronicClaims,
	    __totalClaims
	)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please learn about how filters interact with each other when you use them in CALCULATE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 20:20:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Interaction-causes-invalid-calculation/m-p/1146040#M17308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-07T20:20:32Z</dc:date>
    </item>
  </channel>
</rss>

