<?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 does the AI/BI Dashboard Custom Calculations feature actually work? in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119661#M2065</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/164894"&gt;@dougtrajano&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The idea of the custom calculations here are that they evaluate to a single value for the entire table. In the expression here, you are trying to divide a column (acessos) by a single value (sum of acessos). The error is happening because this wouldn't return a single value for the table, it would evaluate to a single value for each row.&lt;/P&gt;
&lt;P&gt;Based on your description, I think what you want here is either:&lt;/P&gt;
&lt;P&gt;1. Another column that is the value in acessos / sum(acessos), which should be defined in the query.&lt;/P&gt;
&lt;P&gt;2. A single value, in which case you'd need some sort of agregation on the numerator (currently the whole column 'acessos') to have it evaluate to a single value, so that the expression as a whole can return a single value.&lt;/P&gt;
&lt;P&gt;If you have a clear description of what you are trying to calculate, I can help you modify the expression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 May 2025 22:19:36 GMT</pubDate>
    <dc:creator>Shua42</dc:creator>
    <dc:date>2025-05-19T22:19:36Z</dc:date>
    <item>
      <title>How does the AI/BI Dashboard Custom Calculations feature actually work?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119556#M2063</link>
      <description>&lt;P&gt;I am trying to compute the &lt;STRONG&gt;market_share&lt;/STRONG&gt; measure using the &lt;STRONG&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dashboards/datasets/custom-calculations" target="_blank" rel="noopener"&gt;Custom Calculations&lt;/A&gt;&lt;/STRONG&gt; functionality in the AI/BI Dashboard.&lt;/P&gt;&lt;P&gt;My dataset looks like this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;empresa (company): The name of the company.&lt;/LI&gt;&lt;LI&gt;acessos (accesses): Count of access.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-05-18 at 12.00.04 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16925i9425A366EB8691BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-05-18 at 12.00.04 PM.png" alt="Screenshot 2025-05-18 at 12.00.04 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My Custom Calculation expression is this one:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-05-18 at 12.00.37 PM.png" style="width: 325px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16926i70D2ED56F4AA7329/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-05-18 at 12.00.37 PM.png" alt="Screenshot 2025-05-18 at 12.00.37 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It appears that the Custom Calculations feature applies to each row and cannot reference dataset statistics, such as the sum of a given column.&lt;/P&gt;&lt;P&gt;As far as I know, I should be able to do that in the Legacy Dashboard, but it was deprecated. It seems that AI/BI Dashboards are quite limited.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;System Info&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Azure Databricks&lt;/LI&gt;&lt;LI&gt;Serverless SQL Warehouse&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2025 15:40:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119556#M2063</guid>
      <dc:creator>dougtrajano</dc:creator>
      <dc:date>2025-05-18T15:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: How does the AI/BI Dashboard Custom Calculations feature actually work?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119661#M2065</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/164894"&gt;@dougtrajano&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The idea of the custom calculations here are that they evaluate to a single value for the entire table. In the expression here, you are trying to divide a column (acessos) by a single value (sum of acessos). The error is happening because this wouldn't return a single value for the table, it would evaluate to a single value for each row.&lt;/P&gt;
&lt;P&gt;Based on your description, I think what you want here is either:&lt;/P&gt;
&lt;P&gt;1. Another column that is the value in acessos / sum(acessos), which should be defined in the query.&lt;/P&gt;
&lt;P&gt;2. A single value, in which case you'd need some sort of agregation on the numerator (currently the whole column 'acessos') to have it evaluate to a single value, so that the expression as a whole can return a single value.&lt;/P&gt;
&lt;P&gt;If you have a clear description of what you are trying to calculate, I can help you modify the expression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 22:19:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119661#M2065</guid>
      <dc:creator>Shua42</dc:creator>
      <dc:date>2025-05-19T22:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: How does the AI/BI Dashboard Custom Calculations feature actually work?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119679#M2066</link>
      <description>&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;I want to calculate the market share. To do so, I must divide each row value by the sum of the "acessos" column.&lt;/P&gt;&lt;P&gt;I was able to do that in the query using an &lt;STRONG&gt;&lt;A href="https://docs.databricks.com/gcp/en/sql/language-manual/sql-ref-window-functions" target="_blank"&gt;window function&lt;/A&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sum(acessos) / sum(sum(acessos)) OVER () AS market_share&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, including that in the query limits the type of filter I can use. I would like to use the "Field" filter type so the filters can dynamically reflect column values. If I add this expression to the query, I can only use the "String," "Numeric," and "Date" types. The "Query Based Dropdown List" option, which is available in the SQL Editor, is not accessible in the AI/BI Dashboard.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Description of what I am trying to calculate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I am creating a Dataset in the AI/BI Dashboard, this dataset returns two columns and applied several filters in a given UC table. The columns are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;company: The name of the company.&lt;/LI&gt;&lt;LI&gt;sum(views) AS total_views: The count of views.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I would like to calculate the &lt;STRONG&gt;market_share&lt;/STRONG&gt; based on &lt;STRONG&gt;total_views&lt;/STRONG&gt; column in a way that I can change the Dashboard Filters and it reflects to the &lt;STRONG&gt;market_share&lt;/STRONG&gt; calculation.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 02:30:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119679#M2066</guid>
      <dc:creator>dougtrajano</dc:creator>
      <dc:date>2025-05-20T02:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: How does the AI/BI Dashboard Custom Calculations feature actually work?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119790#M2067</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/164894"&gt;@dougtrajano&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I've been playing around with trying to recreate this on my end, and my understanding is that you're trying to have a filter selection dynamically effect a calculation. Unfortunately I don't think this type of behavior is currently supported, as custom calculations don't take filter's into their context. There might be way to hack this behavior i you get clever with the data setup, but nothing came to mind for me as I was trying it out.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 16:42:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119790#M2067</guid>
      <dc:creator>Shua42</dc:creator>
      <dc:date>2025-05-20T16:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: How does the AI/BI Dashboard Custom Calculations feature actually work?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119799#M2068</link>
      <description>&lt;P&gt;Hi Doug,&lt;/P&gt;
&lt;P&gt;Thanks for testing out the custom calcs feature! You're correct that today, we don't yet support "level of detail" type calculations, where you can specify an aggregation to ignore group bys. We are hoping to introduce this in coming quarters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 18:30:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119799#M2068</guid>
      <dc:creator>Alex_Lichen</dc:creator>
      <dc:date>2025-05-20T18:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: How does the AI/BI Dashboard Custom Calculations feature actually work?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119824#M2073</link>
      <description>&lt;P&gt;Hi Alex, thank you for your response!&lt;/P&gt;&lt;P&gt;I will create a Databricks app for it as a workaround while we do not support it natively in custom calculations. Thank you!&lt;BR /&gt;&lt;BR /&gt;Thank you, Shua42, for trying to help me.&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 03:07:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/119824#M2073</guid>
      <dc:creator>dougtrajano</dc:creator>
      <dc:date>2025-05-21T03:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: How does the AI/BI Dashboard Custom Calculations feature actually work?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/120770#M2093</link>
      <description>&lt;P&gt;Actually, I was able to do that using the AI/BI Dashboard.&lt;/P&gt;&lt;P&gt;I created &lt;STRONG&gt;&lt;A href="https://docs.databricks.com/aws/en/dashboards/parameters#query-based-parameters" target="_blank" rel="noopener"&gt;query-based parameters&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;and computed the market share in my own SQL Query.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 22:25:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-does-the-ai-bi-dashboard-custom-calculations-feature/m-p/120770#M2093</guid>
      <dc:creator>dougtrajano</dc:creator>
      <dc:date>2025-06-02T22:25:14Z</dc:date>
    </item>
  </channel>
</rss>

