<?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: Measures: Approved and Distinct in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-Approved-and-Distinct/m-p/2321234#M57988</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="289633" data-lia-user-login="Yrstruly2021" class="lia-mention lia-mention-user"&gt;Yrstruly2021&lt;/a&gt;&amp;nbsp;Sorry, having trouble following, can you post sample data as text and expected output?&lt;BR /&gt;Not really enough information to go on, please first check if your issue is a common issue listed here: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The most important parts are:&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;/P&gt;</description>
    <pubDate>Sat, 05 Feb 2022 16:24:51 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2022-02-05T16:24:51Z</dc:date>
    <item>
      <title>Measures: Approved and Distinct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-Approved-and-Distinct/m-p/2321046#M57984</link>
      <description>&lt;P&gt;Please assist?&lt;/P&gt;&lt;P&gt;I would like to calculate the services rejected. I have total services requested and services approved. I tried to subtract the two, i am getting errors.&lt;/P&gt;&lt;P&gt;Also would like to:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure = DISTINCTCOUNT(&lt;/SPAN&gt;&lt;SPAN&gt;Activitypoint)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;I&amp;nbsp; want to see the Approved for this distinct calculation?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://drive.google.com/file/d/1iI5CmvZMKetaVV7Ugwc9pBXqQqFIuAxu/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1iI5CmvZMKetaVV7Ugwc9pBXqQqFIuAxu/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2022 12:32:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-Approved-and-Distinct/m-p/2321046#M57984</guid>
      <dc:creator>Yrstruly2021</dc:creator>
      <dc:date>2022-02-05T12:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Measures: Approved and Distinct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-Approved-and-Distinct/m-p/2321234#M57988</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="289633" data-lia-user-login="Yrstruly2021" class="lia-mention lia-mention-user"&gt;Yrstruly2021&lt;/a&gt;&amp;nbsp;Sorry, having trouble following, can you post sample data as text and expected output?&lt;BR /&gt;Not really enough information to go on, please first check if your issue is a common issue listed here: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The most important parts are:&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2022 16:24:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-Approved-and-Distinct/m-p/2321234#M57988</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-02-05T16:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Measures: Approved and Distinct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-Approved-and-Distinct/m-p/2321346#M57992</link>
      <description>&lt;P&gt;Please give dax equivalent of&amp;nbsp; "&lt;SPAN&gt;countd( if [Is Approved]=1 then ([Activitypoint])end&lt;/SPAN&gt;"?&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2022 21:41:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-Approved-and-Distinct/m-p/2321346#M57992</guid>
      <dc:creator>Yrstruly2021</dc:creator>
      <dc:date>2022-02-05T21:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Measures: Approved and Distinct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-Approved-and-Distinct/m-p/2321348#M57993</link>
      <description>&lt;P&gt;CREATE TABLE [dbo].[ServiceRequest_3](&lt;BR /&gt;[id] [int] NOT NULL,&lt;BR /&gt;[activitypoint] [float] NULL,&lt;BR /&gt;[startdate] [datetime] NULL,&lt;BR /&gt;[enddate] [datetime] NULL,&lt;BR /&gt;[fbocode] [nvarchar](255) NULL,&lt;BR /&gt;[ordertype] [float] NULL,&lt;BR /&gt;[ordercategory] [float] NULL,&lt;BR /&gt;[requestorid] [nvarchar](255) NULL,&lt;BR /&gt;[quotation] [float] NULL,&lt;BR /&gt;[address] [nvarchar](255) NULL,&lt;BR /&gt;[inspectiontype] [float] NULL,&lt;BR /&gt;[analysistype] [float] NULL,&lt;BR /&gt;[certificationtype] [float] NULL,&lt;BR /&gt;[volume] [float] NULL,&lt;BR /&gt;[targetregion] [float] NULL,&lt;BR /&gt;[targetcountry] [float] NULL,&lt;BR /&gt;[servicerequeststate_id] [int] NOT NULL,&lt;BR /&gt;[submittedforapproval] [float] NULL,&lt;BR /&gt;[IsApproved] [float] NULL,&lt;BR /&gt;[datecreated] [datetime] NULL,&lt;BR /&gt;[datemodified] [datetime] NULL,&lt;BR /&gt;[dateapproved] [datetime] NULL,&lt;BR /&gt;[modifiedby] [float] NULL,&lt;BR /&gt;[approvedby] [float] NULL,&lt;BR /&gt;[acceptedterms] [float] NULL,&lt;BR /&gt;[structurecode] [int] NOT NULL,&lt;BR /&gt;[rejectionreason] [nvarchar](255) NULL,&lt;BR /&gt;[iscancelled] [float] NULL,&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2022 21:44:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-Approved-and-Distinct/m-p/2321348#M57993</guid>
      <dc:creator>Yrstruly2021</dc:creator>
      <dc:date>2022-02-05T21:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Measures: Approved and Distinct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-Approved-and-Distinct/m-p/2341621#M59110</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="289633" data-lia-user-login="Yrstruly2021" class="lia-mention lia-mention-user"&gt;Yrstruly2021&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Request 1:&lt;/P&gt;
&lt;P&gt;You will need to create columns to get day, week and month for the ids.&lt;/P&gt;
&lt;P&gt;Then create measures as below by using ALLEXCEPT() function.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/allexcept-function-dax" target="_self"&gt;https://docs.microsoft.com/en-us/dax/allexcept-function-dax&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;measure1 = calculate(distinctcount([id]),ALLEXCEPT('table',[day]))&lt;/P&gt;
&lt;P&gt;measure2 = calculate(distinctcount([id]),ALLEXCEPT('table',[week]))&lt;/P&gt;
&lt;P&gt;measure3 = calculate(distinctcount([id]),ALLEXCEPT('table',[month]))&lt;BR /&gt;Request 2:&lt;/P&gt;
&lt;P&gt;Use FILTER() function to add the conditions to formula.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/filter-function-dax" target="_self"&gt;https://docs.microsoft.com/en-us/dax/filter-function-dax&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;approved =&amp;nbsp;calculate(distinctcount([id]),FILTER(allselected('table'),[servicerequeststate_id] = 6&lt;/P&gt;
&lt;P&gt;rejected =&amp;nbsp;calculate(distinctcount([id]),FILTER(allselected('table'),[servicerequeststate_id] = 5&lt;/P&gt;
&lt;P&gt;Request 3:&lt;/P&gt;
&lt;P&gt;activity point live =&amp;nbsp;calculate(distinctcount([activitypoint]),FILTER(allselected('table'),[servicerequeststate_id] = 6&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Reagrds,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 08:58:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-Approved-and-Distinct/m-p/2341621#M59110</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-16T08:58:44Z</dc:date>
    </item>
  </channel>
</rss>

