<?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: Incorrect DIVIDE result when dividing two meausres in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Incorrect-DIVIDE-result-when-dividing-two-meausres/m-p/3417858#M44303</link>
    <description>&lt;P&gt;&lt;SPAN&gt;After reviewing the data model, the problem was traced back to mismatched date formats from two data sources. The&amp;nbsp;&lt;/SPAN&gt;fact_items[date]&lt;SPAN&gt; column had a "ddmmyyyy" format, whereas the &lt;/SPAN&gt;dim_google[date]&lt;SPAN&gt; column used the "yyyymmdd" format. Attempting to join data based on these mismatched date formats resulted in errors.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2023 13:59:00 GMT</pubDate>
    <dc:creator>FinancialAdviso</dc:creator>
    <dc:date>2023-09-06T13:59:00Z</dc:date>
    <item>
      <title>Incorrect DIVIDE result when dividing two meausres</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Incorrect-DIVIDE-result-when-dividing-two-meausres/m-p/3412314#M44232</link>
      <description>&lt;P&gt;Hi community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing an issue with my DAX DIVIDE measure and would appreciate your insights on this .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data Model Overview:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Date table:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;Marked as a date table with unique date fields.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;dim_google:&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;Columns: 'date', 'page location', 'screen_page_views'&lt;/LI&gt;&lt;LI&gt;Data transformation: Originally had timestamp date fields which I converted to Date format and grouped by 'date' &amp;amp; 'page location' to have unique page/date combinations.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;fact_items:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;Columns include 'date' and 'id'.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Relationships Set:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Date[Date] has a 1-many relationship with fact_items[date]&lt;/LI&gt;&lt;LI&gt;Date[Date] has a 1-many relationship with dim_google[date]&lt;/LI&gt;&lt;LI&gt;dim_category[id] has a 1-many relationship with fact_items[category_id], I am using [code] field to filter the fact_items with the filters pane.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Measures Created:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;Items_Purchased: CALCULATE( DISTINCTCOUNT(fact_items[id]) )&lt;/PRE&gt;&lt;PRE&gt;Add_to_Cart: CALCULATE( SUM( 'GA4'[screen_page_views] ), CONTAINSSTRING( 'GA4'[page_location], "/cart_item" ) || CONTAINSSTRING('GA4'[page_location], "cart") )&lt;/PRE&gt;&lt;PRE&gt;Conversion Rate: DIVIDE(
[Items_Purchased],
[Add_to_Cart], BLANK()
)&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;When I evaluate the two measures ([Items_Purchased] and [Add_to_Cart]) separately, they provide correct values for whole periods.&lt;/LI&gt;&lt;LI&gt;However, using the above measures, my conversion rate for 2022-04-20 is being calculated as 263.2% when I expect it to be 150/178 = 84.3%. I don't notice any nulls or 0 in&amp;nbsp;numerator and denominator.&lt;/LI&gt;&lt;LI&gt;I also noticed that I'm not able to see the conversion rate for dates before 2022-04-19.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="FinancialAdvise_1-1693674896845.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/963868iD7393AC20E789102/image-size/large?v=v2&amp;amp;px=999" role="button" title="FinancialAdvise_1-1693674896845.png" alt="FinancialAdvise_1-1693674896845.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could someone please help me understand the reason for these discrepancies in the conversion rate calculations? Do I need to create additional relationship between&amp;nbsp;fact_items[date] and&amp;nbsp;dim_google[date].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2023 23:06:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Incorrect-DIVIDE-result-when-dividing-two-meausres/m-p/3412314#M44232</guid>
      <dc:creator>FinancialAdviso</dc:creator>
      <dc:date>2023-09-02T23:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect DIVIDE result when dividing two meausres</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Incorrect-DIVIDE-result-when-dividing-two-meausres/m-p/3414574#M44256</link>
      <description>&lt;P&gt;Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 23:40:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Incorrect-DIVIDE-result-when-dividing-two-meausres/m-p/3414574#M44256</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-09-04T23:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect DIVIDE result when dividing two meausres</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Incorrect-DIVIDE-result-when-dividing-two-meausres/m-p/3417858#M44303</link>
      <description>&lt;P&gt;&lt;SPAN&gt;After reviewing the data model, the problem was traced back to mismatched date formats from two data sources. The&amp;nbsp;&lt;/SPAN&gt;fact_items[date]&lt;SPAN&gt; column had a "ddmmyyyy" format, whereas the &lt;/SPAN&gt;dim_google[date]&lt;SPAN&gt; column used the "yyyymmdd" format. Attempting to join data based on these mismatched date formats resulted in errors.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 13:59:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Incorrect-DIVIDE-result-when-dividing-two-meausres/m-p/3417858#M44303</guid>
      <dc:creator>FinancialAdviso</dc:creator>
      <dc:date>2023-09-06T13:59:00Z</dc:date>
    </item>
  </channel>
</rss>

