<?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: How can I make calculations in a visual table for Income Statement/ P&amp;amp;L in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3534317#M135804</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am a bit confused about the logic, but please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I hope you can try to amend the formula if I misunderstood the logic.&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;
&lt;LI-CODE lang="markup"&gt;expected result measure: =
VAR _revenue =
    CALCULATE (
        [Total Actuals],
        'Account Mapping'[Row Index] = 1,
        REMOVEFILTERS ( IsStructure )
    )
VAR _cost =
    CALCULATE (
        [Total Actuals],
        'Account Mapping'[Row Index] = 2,
        REMOVEFILTERS ( IsStructure )
    )
VAR _grossprofit = _revenue + _cost
VAR _gpmargin =
    DIVIDE ( _grossprofit, _revenue )
VAR _otherincome =
    CALCULATE (
        [Total Actuals],
        'Account Mapping'[Row Index] = 6,
        REMOVEFILTERS ( IsStructure )
    )
VAR _sga =
    CALCULATE (
        [Total Actuals],
        'Account Mapping'[Row Index] = 5,
        REMOVEFILTERS ( IsStructure )
    )
VAR _ebitda = _grossprofit + _otherincome - _sga
RETURN
    SWITCH (
        SELECTEDVALUE ( IsStructure[Row Index] ),
        3, _grossprofit,
        4, FORMAT ( _gpmargin, "#.00%" ),
        7, _ebitda,
        [Total Actuals]
    )
&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 15 Nov 2023 04:20:27 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2023-11-15T04:20:27Z</dc:date>
    <item>
      <title>How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3532239#M135731</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a visusal I have creating using GL and Account Tables&lt;/P&gt;&lt;P&gt;Kindly let me know how can I make the calculations for missing rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gross profit = Revenue - Cost of Sale&lt;/P&gt;&lt;P&gt;GP Margin = Gross Profit/Revenue&lt;/P&gt;&lt;P&gt;EBITDA =&amp;nbsp; Gross Profit+ Other Income - SQ&amp;amp;A&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;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 05:46:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3532239#M135731</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-14T05:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3532308#M135734</link>
      <description>&lt;P&gt;Hi, I am not sure how your datamodel looks like, but please try to write an additinoal measure something like below whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/selectedvalue-function?wt.mc_id=DP-MVP-5004989" target="_blank" rel="noopener"&gt;SELECTEDVALUE function - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/switch-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank" rel="noopener"&gt;SWITCH function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&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;expected result measure: =
SWITCH (
    SELECTEDVALUE ( tablename[Description Profit &amp;amp; Loss Statement] ),
    "Gross profit",
        CALCULATE (
            [Total Actuals],
            tablename[Description Profit &amp;amp; Loss Statement] = "Revenue"
        )
            - CALCULATE (
                [Total Actuals],
                tablename[Description Profit &amp;amp; Loss Statement] = "Cost of Sale"
            ),
    "GP Margin",
        DIVIDE (
            CALCULATE (
                [Total Actuals],
                tablename[Description Profit &amp;amp; Loss Statement] = "Gross Profit"
            ),
            CALCULATE (
                [Total Actuals],
                tablename[Description Profit &amp;amp; Loss Statement] = "Revenue"
            )
        ),
    "EBITDA",
        CALCULATE (
            [Total Actuals],
            tablename[Description Profit &amp;amp; Loss Statement] = "Gross Profit"
        )
            + CALCULATE (
                [Total Actuals],
                tablename[Description Profit &amp;amp; Loss Statement] = "Other Income"
            )
            - CALCULATE (
                [Total Actuals],
                tablename[Description Profit &amp;amp; Loss Statement] = "SQ&amp;amp;A"
            ),
    [Total Actuals]
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 06:23:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3532308#M135734</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-11-14T06:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3532362#M135739</link>
      <description>&lt;P&gt;Hi Jihwa,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the quick answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the Switch function, However I'm not getting the results.&amp;nbsp; Kindly advise&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, 14 Nov 2023 06:53:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3532362#M135739</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-14T06:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3533568#M135779</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please share your sample pbix file's link, and then I can try to look into it.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 17:24:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3533568#M135779</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-11-14T17:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3533631#M135783</link>
      <description>&lt;P&gt;HI Jihwan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find the sample file attached.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://app.powerbi.com/groups/me/reports/9f18dfb1-03c7-4ae3-9987-5dbb13de2db4/ReportSection?experience=power-bi" target="_blank"&gt;Sample File - Power BI&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 18:04:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3533631#M135783</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-14T18:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3534280#M135800</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I think the link directs to the power bi service, not to the file.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 03:31:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3534280#M135800</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-11-15T03:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3534294#M135802</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Jihwan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resharing the sample file link. Hope this is accessible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1DVEE_B33t-JY8SStyX7QTYOP_ZjeC1oW/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1DVEE_B33t-JY8SStyX7QTYOP_ZjeC1oW/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 03:45:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3534294#M135802</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-15T03:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3534317#M135804</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am a bit confused about the logic, but please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I hope you can try to amend the formula if I misunderstood the logic.&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;
&lt;LI-CODE lang="markup"&gt;expected result measure: =
VAR _revenue =
    CALCULATE (
        [Total Actuals],
        'Account Mapping'[Row Index] = 1,
        REMOVEFILTERS ( IsStructure )
    )
VAR _cost =
    CALCULATE (
        [Total Actuals],
        'Account Mapping'[Row Index] = 2,
        REMOVEFILTERS ( IsStructure )
    )
VAR _grossprofit = _revenue + _cost
VAR _gpmargin =
    DIVIDE ( _grossprofit, _revenue )
VAR _otherincome =
    CALCULATE (
        [Total Actuals],
        'Account Mapping'[Row Index] = 6,
        REMOVEFILTERS ( IsStructure )
    )
VAR _sga =
    CALCULATE (
        [Total Actuals],
        'Account Mapping'[Row Index] = 5,
        REMOVEFILTERS ( IsStructure )
    )
VAR _ebitda = _grossprofit + _otherincome - _sga
RETURN
    SWITCH (
        SELECTEDVALUE ( IsStructure[Row Index] ),
        3, _grossprofit,
        4, FORMAT ( _gpmargin, "#.00%" ),
        7, _ebitda,
        [Total Actuals]
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 15 Nov 2023 04:20:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3534317#M135804</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-11-15T04:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3534608#M135815</link>
      <description>&lt;P&gt;Hi Jihwan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is working as expected (I have edit the code for NPBT and NPAT).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you a lot for the quick support!!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Quick question: How can highlight only the EBITDA and EBITDA Margin row. (Tried with formating but didnt work)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 08:07:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3534608#M135815</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-15T08:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3535611#M135863</link>
      <description>&lt;P&gt;Hi, One of ways to achieve this is to create a measure like below, and then put into the background color option, something like below.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&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;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;background color measure: = 
IF( SELECTEDVALUE( IsStructure[Row Index] ) = 7, "Yellow" )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 17:38:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3535611#M135863</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-11-15T17:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3535641#M135865</link>
      <description>&lt;P&gt;Hi Jihwan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you a lot for the suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this before. However I want to highlight both EBITDA and EBITDA Margin entire row at once. Kindly let me know how to imrove this method to cheive 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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 17:53:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3535641#M135865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-15T17:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make calculations in a visual table for Income Statement/ P&amp;L</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3540896#M136068</link>
      <description>&lt;P&gt;Thank you a lot for the support!&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2023 11:38:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-make-calculations-in-a-visual-table-for-Income/m-p/3540896#M136068</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-19T11:38:57Z</dc:date>
    </item>
  </channel>
</rss>

