<?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 table to create a revenue funnel visual? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-table-to-create-a-revenue-funnel-visual/m-p/3454450#M131648</link>
    <description>&lt;P&gt;To create a DAX table that represents the revenue funnel structure you described, you can use DAX measures and calculated tables in Power BI or any other tool that supports DAX. Here's how you can create the table step by step:&lt;/P&gt;&lt;P&gt;Assuming your fact table is named "Transactions," and it has columns named "Date," "Type," and "Amount," you can create the revenue funnel table using the following DAX measures and calculated table:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Calculate Revenue and Expense:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;First, create two DAX measures to calculate the total revenue and total expenses for each year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total Revenue = SUMX(FILTER(Transactions, Transactions[Type] = "revenue"), Transactions[Amount])&lt;/P&gt;&lt;P&gt;Total Expenses = SUMX(FILTER(Transactions, Transactions[Type] = "expense"), Transactions[Amount])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Calculate Margins:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Next, create a DAX measure to calculate the margins for each year. You can subtract total expenses from total revenue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Margins = [Total Revenue] - [Total Expenses]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a Calculated Table:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Now, create a calculated table that includes the desired structure with the year, type (revenue and margins), and amount.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RevenueFunnelTable =&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;Transactions,&lt;BR /&gt;Transactions[Year],&lt;BR /&gt;"Type", "revenue",&lt;BR /&gt;"Amount", [Total Revenue]&lt;BR /&gt;)&lt;BR /&gt;UNION&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;Transactions,&lt;BR /&gt;Transactions[Year],&lt;BR /&gt;"Type", "margins",&lt;BR /&gt;"Amount", [Margins]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This calculated table combines the revenue and margins data for each year into the structure you mentioned.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Visualization:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Finally, in your visualization tool (e.g., Power BI), you can use the "Year" column for the funnel group and the "Amount" column for the funnel value to create the revenue funnel visual.&lt;/P&gt;&lt;P&gt;Ensure that you replace "Transactions" with the actual name of your fact table and adjust column names as needed if they are different in your data model.&lt;/P&gt;&lt;P&gt;Once you've created this calculated table and set up the visualization, you should be able to visualize the revenue funnel as described.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 30 Sep 2023 06:58:06 GMT</pubDate>
    <dc:creator>123abc</dc:creator>
    <dc:date>2023-09-30T06:58:06Z</dc:date>
    <item>
      <title>DAX table to create a revenue funnel visual?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-table-to-create-a-revenue-funnel-visual/m-p/3453134#M131575</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;my main fact table is financial transactions which look pretty much like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;date&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;type&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;amount&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10/12/22&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;revenue&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;100$&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10/12/22&lt;/TD&gt;&lt;TD&gt;expense&lt;/TD&gt;&lt;TD&gt;50$&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/01/23&lt;/TD&gt;&lt;TD&gt;revenue&lt;/TD&gt;&lt;TD&gt;100$&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/01/23&lt;/TD&gt;&lt;TD&gt;expense&lt;/TD&gt;&lt;TD&gt;30$&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;05/01/23&lt;/TD&gt;&lt;TD&gt;revenue&lt;/TD&gt;&lt;TD&gt;150$&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;05/01/23&lt;/TD&gt;&lt;TD&gt;expense&lt;/TD&gt;&lt;TD&gt;75$&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a revenue funnel visual that shows the conversion between the revenue and the margins.&lt;/P&gt;&lt;P&gt;from what I understand, I need to get a table at this structure ( I can drop the year but I want to keep it for future visualization)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;year&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;type&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;amount&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;revenue&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;100$&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;margins&lt;/TD&gt;&lt;TD&gt;(100$-50$) = 50$&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2023&lt;/TD&gt;&lt;TD&gt;revenue&lt;/TD&gt;&lt;TD&gt;(100$+150$) = 250$&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2023&lt;/TD&gt;&lt;TD&gt;margins&lt;/TD&gt;&lt;TD&gt;(100$+150$) - (30$+75$) =&amp;nbsp; 145$&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I will drag the type to the funnel group and the amount to the funnel value.&lt;/P&gt;&lt;P&gt;How can I create this table using DAX?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks! Tal&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 08:22:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-table-to-create-a-revenue-funnel-visual/m-p/3453134#M131575</guid>
      <dc:creator>tal_il</dc:creator>
      <dc:date>2023-09-29T08:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: DAX table to create a revenue funnel visual?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-table-to-create-a-revenue-funnel-visual/m-p/3454450#M131648</link>
      <description>&lt;P&gt;To create a DAX table that represents the revenue funnel structure you described, you can use DAX measures and calculated tables in Power BI or any other tool that supports DAX. Here's how you can create the table step by step:&lt;/P&gt;&lt;P&gt;Assuming your fact table is named "Transactions," and it has columns named "Date," "Type," and "Amount," you can create the revenue funnel table using the following DAX measures and calculated table:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Calculate Revenue and Expense:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;First, create two DAX measures to calculate the total revenue and total expenses for each year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total Revenue = SUMX(FILTER(Transactions, Transactions[Type] = "revenue"), Transactions[Amount])&lt;/P&gt;&lt;P&gt;Total Expenses = SUMX(FILTER(Transactions, Transactions[Type] = "expense"), Transactions[Amount])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Calculate Margins:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Next, create a DAX measure to calculate the margins for each year. You can subtract total expenses from total revenue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Margins = [Total Revenue] - [Total Expenses]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a Calculated Table:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Now, create a calculated table that includes the desired structure with the year, type (revenue and margins), and amount.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RevenueFunnelTable =&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;Transactions,&lt;BR /&gt;Transactions[Year],&lt;BR /&gt;"Type", "revenue",&lt;BR /&gt;"Amount", [Total Revenue]&lt;BR /&gt;)&lt;BR /&gt;UNION&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;Transactions,&lt;BR /&gt;Transactions[Year],&lt;BR /&gt;"Type", "margins",&lt;BR /&gt;"Amount", [Margins]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This calculated table combines the revenue and margins data for each year into the structure you mentioned.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Visualization:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Finally, in your visualization tool (e.g., Power BI), you can use the "Year" column for the funnel group and the "Amount" column for the funnel value to create the revenue funnel visual.&lt;/P&gt;&lt;P&gt;Ensure that you replace "Transactions" with the actual name of your fact table and adjust column names as needed if they are different in your data model.&lt;/P&gt;&lt;P&gt;Once you've created this calculated table and set up the visualization, you should be able to visualize the revenue funnel as described.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2023 06:58:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-table-to-create-a-revenue-funnel-visual/m-p/3454450#M131648</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-09-30T06:58:06Z</dc:date>
    </item>
  </channel>
</rss>

