<?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: Measure with conditional calculation not working in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-conditional-calculation-not-working/m-p/2732376#M83700</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Datamodel:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data to understand:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PNL lines: string, eg "Total Sales"&lt;/P&gt;&lt;P&gt;Actual TY :&amp;nbsp; Measure (sum of Actuals),&amp;nbsp; correspond with the correct PNL line. Several accounts go into one PNL line.&lt;/P&gt;&lt;P&gt;Actuals: numbers in Account Data Table per Account.&lt;/P&gt;&lt;P&gt;Dimensions:&lt;/P&gt;&lt;P&gt;Units: string, code representing a department&lt;/P&gt;&lt;P&gt;Time: Month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result should be a visaul table with:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;row: pnl lines&lt;/P&gt;&lt;P&gt;columns: actual ty, MEASURE X&lt;/P&gt;&lt;P&gt;filters: units, time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MEASURE X =&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Actuals TY/ Actuals TY of "Total Sales" Line.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Except for the "Lines Sales of Goods" and "Sales of Product Related Services" I should have the value of the&lt;U&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Actuals TY/ Actuals TY of "Total Gross profit" Line&lt;/U&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Aug 2022 11:11:08 GMT</pubDate>
    <dc:creator>GoBil</dc:creator>
    <dc:date>2022-08-29T11:11:08Z</dc:date>
    <item>
      <title>Measure with conditional calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-conditional-calculation-not-working/m-p/2728204#M83465</link>
      <description>&lt;P&gt;Hi Community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm stuck with a calculation I would like to do in DAX and was hoping to get your help.&lt;/P&gt;&lt;P&gt;I'm creating a financial report, showing already actuals, last year actuals, forecast and goals.&lt;/P&gt;&lt;P&gt;Now I need to add a column (Index %) to the overview that is showing per row the &lt;U&gt;Actuals/ Actuals of "Total Sales" Line.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Except for the "Lines Sales of Goods" and "Sales of Product Related Services" I should have the value of the&lt;U&gt; Actuals / Actuals of "Total Gross profit" Line&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I already tried several calculations in DAX, working with Calculated, SUM, Filter etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created the following measure already:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Actuals TY = &lt;/SPAN&gt;&lt;SPAN&gt;Calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Account Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Actuals]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total Sales = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Account Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Actuals]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Account Data'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Account Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Official Lines]&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;"Total Sales"&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;'Account Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Unit]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Units&lt;/SPAN&gt;&lt;SPAN&gt;[Unit]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Account Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Business Group]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Business Group'&lt;/SPAN&gt;&lt;SPAN&gt;[Business Group]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Account Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Period]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[Period]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;-&amp;gt; is not properly working. If I add it as a column, just to test the values, I only get a vaule for Total Sales Line, while I should get the value of Total Sales in all the Lines.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales Index = &lt;/SPAN&gt;&lt;SPAN&gt;Iferror&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Actuals TY]&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;[Total Sales]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;-&amp;gt; Here I should have a IF function I suppose, where I take Total Gross Profit in case the pnl line is Sales of Goods Or Sales of PRS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI, maybe also need to know that I'm working with a two facts data model, the Row "Official PnL lines" are coming from dimension table (many-1 rel.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not even sure it is possible or easy to implement, but any tips are welcome!&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 08:30:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-conditional-calculation-not-working/m-p/2728204#M83465</guid>
      <dc:creator>GoBil</dc:creator>
      <dc:date>2022-08-26T08:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with conditional calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-conditional-calculation-not-working/m-p/2730566#M83598</link>
      <description>&lt;P&gt;Please provide sanitized sample data that fully covers your issue. I can only help you with meaningful sample data.&lt;BR /&gt;Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 00:39:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-conditional-calculation-not-working/m-p/2730566#M83598</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-08-28T00:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with conditional calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-conditional-calculation-not-working/m-p/2732376#M83700</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Datamodel:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data to understand:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PNL lines: string, eg "Total Sales"&lt;/P&gt;&lt;P&gt;Actual TY :&amp;nbsp; Measure (sum of Actuals),&amp;nbsp; correspond with the correct PNL line. Several accounts go into one PNL line.&lt;/P&gt;&lt;P&gt;Actuals: numbers in Account Data Table per Account.&lt;/P&gt;&lt;P&gt;Dimensions:&lt;/P&gt;&lt;P&gt;Units: string, code representing a department&lt;/P&gt;&lt;P&gt;Time: Month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result should be a visaul table with:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;row: pnl lines&lt;/P&gt;&lt;P&gt;columns: actual ty, MEASURE X&lt;/P&gt;&lt;P&gt;filters: units, time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MEASURE X =&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Actuals TY/ Actuals TY of "Total Sales" Line.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Except for the "Lines Sales of Goods" and "Sales of Product Related Services" I should have the value of the&lt;U&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Actuals TY/ Actuals TY of "Total Gross profit" Line&lt;/U&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 11:11:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-conditional-calculation-not-working/m-p/2732376#M83700</guid>
      <dc:creator>GoBil</dc:creator>
      <dc:date>2022-08-29T11:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with conditional calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-conditional-calculation-not-working/m-p/2733407#M83772</link>
      <description>&lt;P&gt;Please provide sanitized sample data that fully covers your issue. &lt;STRONG&gt;I can only help you with meaningful sample data&lt;/STRONG&gt;.&lt;BR /&gt;Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 19:53:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-conditional-calculation-not-working/m-p/2733407#M83772</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-08-29T19:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with conditional calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-conditional-calculation-not-working/m-p/2740131#M84175</link>
      <description>&lt;P&gt;Yes, I got it that you need sample data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have the capacity currently to make it. I hope to find some time soon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Normally with the detailed descriptions I gave, you should already be able to understand the data I'm dealing with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If someone else has any ideas how I could make this work, always welcome.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 08:32:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-with-conditional-calculation-not-working/m-p/2740131#M84175</guid>
      <dc:creator>GoBil</dc:creator>
      <dc:date>2022-09-01T08:32:06Z</dc:date>
    </item>
  </channel>
</rss>

