<?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: DAX - I need help to upgrade my measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-I-need-help-to-upgrade-my-measure/m-p/4131427#M164096</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="800801" data-lia-user-login="jnsrkd" class="lia-mention lia-mention-user"&gt;jnsrkd&lt;/a&gt;&amp;nbsp;- You don't need DAX for this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use a Matrix Visual and use the column that defines "ANALITICA" and "SINTETICA" alongside the "Desc_Ent_Ger2" column in the rows section. You then just need to play around with the visual formatting to acheiv the result you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the screenshot below, I have expanded both categories and set the layout style to "Tabular"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this works, please accept as the solution for others visibility.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2024 13:48:18 GMT</pubDate>
    <dc:creator>mark_endicott</dc:creator>
    <dc:date>2024-09-03T13:48:18Z</dc:date>
    <item>
      <title>DAX - I need help to upgrade my measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-I-need-help-to-upgrade-my-measure/m-p/4131329#M164090</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm currently working on upgrading my measure and have hit a bit of a roadblock. Here’s where I’m at:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Current Setup&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have a working solution, but I need to add some additional conditions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Analitico_Valor_Realiz = 
VAR MinContaIni = MIN('Visao'[Conta_Ini])
VAR MaxContaFinal = MAX('Visao'[Conta_Final])
VAR MinCCustoIni = MIN('Visao'[CCusto_Ini])
VAR MaxCCustoFinal = MAX('Visao'[CCusto_Final])

RETURN
CALCULATE(
    SUM('Dados'[VALOR_REALIZADO]),
    'Dados'[CODIGO_CONTA] &amp;gt;= MinContaIni &amp;amp;&amp;amp;
    'Dados'[CODIGO_CONTA] &amp;lt;= MaxContaFinal &amp;amp;&amp;amp;
    'Dados'[CENTRO_CUSTO] &amp;gt;= MinCCustoIni &amp;amp;&amp;amp;
    'Dados'[CENTRO_CUSTO] &amp;lt;= MaxCCustoFinal
)+0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What I Need:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I need to incorporate additional conditions into the measure. I’m attaching a PBIX file that currently works, as well as an Excel file that contains both the base data and the expected result, which I achieve through formulas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;= SUMIF ( 'Visao'[Entid_Super];
          'Visao'[Entid_Gerenc];
          'Dados'[VALOR(REALIZADO] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Context:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The 'Visao' dimension table comes from an ERP system (Totvs Protheus). I’m attempting to create a DRE (Income Statement). Both the 'Visao' dimension table and the necessary data are fed into the PBIX file through SQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I also need to include additional conditions. I'm attaching a PBIX file which currently works, and a Excel file which contains both the base data and the expected result, which I achieve thorugh formulas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="PBIX File (Google Drive)" href="https://drive.google.com/file/d/1_O41Vk69RswOxiDiknzpEY0oiZnefTTC/view?usp=drive_link" target="_self"&gt;PBIX File (Google Drive)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Excel File (Google Drive)" href="https://docs.google.com/spreadsheets/d/1edO2BxFxx57hWQ4yFCYFiwZMh22W42rz/edit?usp=drive_link&amp;amp;ouid=106608164850397657337&amp;amp;rtpof=true&amp;amp;sd=true" target="_self"&gt;Excel File (Google Drive)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current result:&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i want to achieve:&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone assist me with this, or provide some guidance on possible solutions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 13:12:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-I-need-help-to-upgrade-my-measure/m-p/4131329#M164090</guid>
      <dc:creator>jnsrkd</dc:creator>
      <dc:date>2024-09-03T13:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - I need help to upgrade my measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-I-need-help-to-upgrade-my-measure/m-p/4131427#M164096</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="800801" data-lia-user-login="jnsrkd" class="lia-mention lia-mention-user"&gt;jnsrkd&lt;/a&gt;&amp;nbsp;- You don't need DAX for this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use a Matrix Visual and use the column that defines "ANALITICA" and "SINTETICA" alongside the "Desc_Ent_Ger2" column in the rows section. You then just need to play around with the visual formatting to acheiv the result you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the screenshot below, I have expanded both categories and set the layout style to "Tabular"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this works, please accept as the solution for others visibility.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 13:48:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-I-need-help-to-upgrade-my-measure/m-p/4131427#M164096</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-09-03T13:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - I need help to upgrade my measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-I-need-help-to-upgrade-my-measure/m-p/4131458#M164098</link>
      <description>&lt;P&gt;I'm sorry; in hindsight, I wasn't clear about the image formatting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem lies in the values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I basically want to create an accounting report of the company's results (monthly).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, the accounts (which are in the dimension table 'Visao') sum only the accounting recordings throughout the month, and these are "analitica" accounts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, there are grouped accounts that sum the "analytical" accounts. These are "sintetica" accounts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, while I have already solved summing the accounting records using the DAX measure, I now need to also group the sums.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I apologize for not creating the PBIX file and Excel file with the same formatting.&lt;BR /&gt;&lt;BR /&gt;In the example (&lt;FONT color="#808080"&gt;internet snippet, no correlation with my files&lt;/FONT&gt;) below, the green check marks are what I already have solved, and the orange x's are what I'm trying to achieve.&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;</description>
      <pubDate>Tue, 03 Sep 2024 14:03:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-I-need-help-to-upgrade-my-measure/m-p/4131458#M164098</guid>
      <dc:creator>jnsrkd</dc:creator>
      <dc:date>2024-09-03T14:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - I need help to upgrade my measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-I-need-help-to-upgrade-my-measure/m-p/4131787#M164118</link>
      <description>&lt;P&gt;Instead of creating a measure, I created a relationship between the tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While power bi doesn't accept range relationships:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;('Dados'[Contas] Between
'Visao'[Conta_Ini] and
'Visao'[Conta_Final]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expanded the possible accounts of&amp;nbsp;'Visao'[Conta_Final] and&amp;nbsp;'Visao'[Conta_Ini] using List.Text.&lt;BR /&gt;&lt;BR /&gt;I also duplicated the 'Visao' and filted 'Analitica' and 'Sintetica', and created a relationship between them too.&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;</description>
      <pubDate>Tue, 03 Sep 2024 17:47:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-I-need-help-to-upgrade-my-measure/m-p/4131787#M164118</guid>
      <dc:creator>jnsrkd</dc:creator>
      <dc:date>2024-09-03T17:47:37Z</dc:date>
    </item>
  </channel>
</rss>

