<?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 to calculate a ratio from both measure filtered in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-ratio-from-both-measure-filtered/m-p/2282927#M55889</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="270902" data-lia-user-login="DIACHROMA" class="lia-mention lia-mention-user"&gt;DIACHROMA&lt;/a&gt; , Try measure like 1 or the 2 &lt;/P&gt;
&lt;P&gt;Countx(filter(values( Customer[NAME] ), [Number of visit] &amp;gt;= 1 &amp;amp;&amp;amp; (isblank([Number of sales]) || [Number of sales ] &amp;lt; 1)), [NAME])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Countx(filter(summarize(Sales, customer[Customer], 'Date'[Date], "_1", [Number of visit], "_2" , [Number of sales]), [_1] &amp;gt;= 1 &amp;amp;&amp;amp; (isblank([_2]) || [_2] &amp;lt; 1)), [NAME])&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jan 2022 03:29:41 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-01-14T03:29:41Z</dc:date>
    <item>
      <title>How to calculate a ratio from both measure filtered</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-ratio-from-both-measure-filtered/m-p/2282241#M55865</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need your help please &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have four tables: Date, Customer, Visit, and Sales.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I would like to calculate the rate of customers who had a visit but no sale &lt;U&gt;on the same day&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I managed to build a table in which I put the following columns: Date, Customer name, Number of visits, Number of sales.&lt;/P&gt;&lt;P&gt;By applying two filters on this visual: Visit = 1 and Sales = 0, I manage to get the list of customers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I need to display this as a KPI and therefore calculate the [Number of visits made without sales on the same day] / [Total number of visits].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the below but it returns nothing and I forgot the "same day" condition :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Visit w/ Sales = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;Customer[NAME]&lt;/SPAN&gt;&lt;SPAN&gt; ) , &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Visits&lt;/SPAN&gt;&lt;SPAN&gt; , &lt;/SPAN&gt;&lt;SPAN&gt;[Number of visit]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;gt;= 1&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;) , &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;( Sales&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;[Number of sales ]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;lt; 1&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any idea about how to do that please ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Pauline&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 17:23:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-ratio-from-both-measure-filtered/m-p/2282241#M55865</guid>
      <dc:creator>DIACHROMA</dc:creator>
      <dc:date>2022-01-13T17:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a ratio from both measure filtered</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-ratio-from-both-measure-filtered/m-p/2282927#M55889</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="270902" data-lia-user-login="DIACHROMA" class="lia-mention lia-mention-user"&gt;DIACHROMA&lt;/a&gt; , Try measure like 1 or the 2 &lt;/P&gt;
&lt;P&gt;Countx(filter(values( Customer[NAME] ), [Number of visit] &amp;gt;= 1 &amp;amp;&amp;amp; (isblank([Number of sales]) || [Number of sales ] &amp;lt; 1)), [NAME])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Countx(filter(summarize(Sales, customer[Customer], 'Date'[Date], "_1", [Number of visit], "_2" , [Number of sales]), [_1] &amp;gt;= 1 &amp;amp;&amp;amp; (isblank([_2]) || [_2] &amp;lt; 1)), [NAME])&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 03:29:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-ratio-from-both-measure-filtered/m-p/2282927#M55889</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-01-14T03:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a ratio from both measure filtered</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-ratio-from-both-measure-filtered/m-p/2283459#M55913</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your help ! I've tried the 1st formula, when I put it in a table I have the correct total (15) but when I put it in a card I have a different result (2) which is not correct.&lt;/P&gt;&lt;P&gt;Let me check with the second one and I'll let you know if it's working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pauline&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 09:42:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-ratio-from-both-measure-filtered/m-p/2283459#M55913</guid>
      <dc:creator>DIACHROMA</dc:creator>
      <dc:date>2022-01-14T09:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a ratio from both measure filtered</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-ratio-from-both-measure-filtered/m-p/2290732#M56304</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="270902" data-lia-user-login="DIACHROMA" class="lia-mention lia-mention-user"&gt;DIACHROMA&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is difficult to create a demo only through words descriptions. Can you show some sample data so that we could test the formula?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 09:58:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-ratio-from-both-measure-filtered/m-p/2290732#M56304</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-19T09:58:38Z</dc:date>
    </item>
  </channel>
</rss>

