<?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: Life events as a percentage of births in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1503723#M29117</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;=DIVIDE(DISTINCTCOUNT(Table5[ID]),CALCULATE(DISTINCTCOUNT(Table5[ID]),Table5[EVENT]="1_BORN"),0)&lt;/P&gt;</description>
    <pubDate>Thu, 19 Nov 2020 03:29:19 GMT</pubDate>
    <dc:creator>wdx223_Daniel</dc:creator>
    <dc:date>2020-11-19T03:29:19Z</dc:date>
    <item>
      <title>Life events as a percentage of births</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1500104#M28993</link>
      <description>&lt;P&gt;I am building a Power BI dashboard off an Excel document that mainly utilizes pivot tables. In a pivot table, I am able to create a calculation that identifies the proportion of all births that have a life event, i.e. what proportion of all the births for a specific time period (month of birth) had a pneumonia event?&lt;/P&gt;&lt;P&gt;The Pivot Table creates these values using the fields of EVENT and BirthDate (summarized as a birth month BMON). In the Pivot Table the column are assigned to EVENT, and the rows to BMON. The summation of values is the COUNT of ID (the unique individual reference number), with the Show Values As option set to "% OF", Base field = EVENT and Base item set as 1_BORN. The resulting values are then displayed as percentages. Of all the individuals born in the month of Feb 2019, 3.5% encountered a pneumonia event is an example result.&lt;/P&gt;&lt;P&gt;The data is structured with fields for ID, BDAT, BMON, EVENT, AGE, and EDAT (reference ID, birthdate, birth month, EVENT, age at event and event date). There may be multiple rows for each individual depending on the events they encountered.&lt;/P&gt;&lt;P&gt;In BI, I am unable to replicate this Excel calculation.&lt;/P&gt;&lt;P&gt;Thank you very much for any insights!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BDAT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;EVENT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AGE&amp;nbsp; &amp;nbsp; EDAT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BMON&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;72281&lt;/TD&gt;&lt;TD&gt;7/29/2019&lt;/TD&gt;&lt;TD&gt;1_BORN&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;7/29/2019&lt;/TD&gt;&lt;TD&gt;7/1/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;72281&lt;/TD&gt;&lt;TD&gt;7/29/2019&lt;/TD&gt;&lt;TD&gt;WEANED&lt;/TD&gt;&lt;TD&gt;69&lt;/TD&gt;&lt;TD&gt;10/6/2019&lt;/TD&gt;&lt;TD&gt;7/1/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;115188&lt;/TD&gt;&lt;TD&gt;11/16/2019&lt;/TD&gt;&lt;TD&gt;1_BORN&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;11/16/2019&lt;/TD&gt;&lt;TD&gt;11/1/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;115191&lt;/TD&gt;&lt;TD&gt;3/9/2019&lt;/TD&gt;&lt;TD&gt;1_BORN&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;3/9/2019&lt;/TD&gt;&lt;TD&gt;3/1/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;115191&lt;/TD&gt;&lt;TD&gt;3/9/2019&lt;/TD&gt;&lt;TD&gt;PNEU.R&lt;/TD&gt;&lt;TD&gt;170&lt;/TD&gt;&lt;TD&gt;8/26/2019&lt;/TD&gt;&lt;TD&gt;3/1/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;115191&lt;/TD&gt;&lt;TD&gt;3/9/2019&lt;/TD&gt;&lt;TD&gt;PNEU.R&lt;/TD&gt;&lt;TD&gt;173&lt;/TD&gt;&lt;TD&gt;8/29/2019&lt;/TD&gt;&lt;TD&gt;3/1/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;115192&lt;/TD&gt;&lt;TD&gt;3/7/2019&lt;/TD&gt;&lt;TD&gt;1_BORN&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;3/7/2019&lt;/TD&gt;&lt;TD&gt;3/1/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;131818&lt;/TD&gt;&lt;TD&gt;2/1/2019&lt;/TD&gt;&lt;TD&gt;PINKEYE&lt;/TD&gt;&lt;TD&gt;179&lt;/TD&gt;&lt;TD&gt;7/30/2019&lt;/TD&gt;&lt;TD&gt;2/1/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;131820&lt;/TD&gt;&lt;TD&gt;2/2/2019&lt;/TD&gt;&lt;TD&gt;1_BORN&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;2/2/2019&lt;/TD&gt;&lt;TD&gt;2/1/2019&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 17 Nov 2020 21:38:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1500104#M28993</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-17T21:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Life events as a percentage of births</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1501254#M29031</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , expected output is not clear to mean, Can you highlight and explain &lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 08:57:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1501254#M29031</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-11-18T08:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Life events as a percentage of births</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1502441#M29070</link>
      <description>&lt;LI-CODE lang="csharp"&gt;// Careful: this measure honors all
// filters you might put on the data,
// so always make sure you understand
// what it returns. T is the table
// with the data you showed in your
// question. Thanks.

[Pneumonia %] =
var __pneumonia =
    CALCULATE(
        DISTINCTCOUNT( T[ID] ),
        KEEPFILTERS( T[EVENT] = "pneu.r" )
    )
var __born =
    DISTINCTCOUNT( T[ID] )
return
    DIVIDE( __pneumonia, __born )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 18 Nov 2020 15:13:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1502441#M29070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-18T15:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Life events as a percentage of births</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1502739#M29090</link>
      <description>&lt;P&gt;Amitchandak&lt;BR /&gt;Thanks very much for your request for clarrification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An Excel pivot table delivers these counts of health events with a grouping focusing on the birth month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then use the Excel Pivot specifications mentioned in the original post to determine the proportion affected (incidence rate) with the number born as the denominator.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the specifications for the Excel pivot summarization:&lt;/P&gt;&lt;P&gt;The Pivot Table creates the incidence values using the fields of EVENT and BirthDate (summarized as a birth month BMON). In the Pivot Table the column is assigned to EVENT, and the rows to BMON. The summation of values is the COUNT of ID (the unique individual reference number), with the Show Values As option set to "% OF", Base field = EVENT and Base item set as 1_BORN. The resulting values are then displayed as percentages. Of all the individuals born in the month of Feb 2019, 3.5% encountered a pneumonia event is an example result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an example of the desired output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The categories of 1_BORN, SOLD and DIED are constants between different datasets, while the health conditions can be variable in name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this better explains the output goal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for considering this question!&amp;nbsp;&lt;/P&gt;&lt;P&gt;KirkpM&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 16:56:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1502739#M29090</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-18T16:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Life events as a percentage of births</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1502768#M29091</link>
      <description>&lt;P&gt;daxer&lt;BR /&gt;Thanks very much for considering this question.&amp;nbsp; I had another request to provide clarrification.&amp;nbsp; Here's a further explanation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An Excel pivot table delivers these counts of health events with a grouping focusing on the birth month.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then use the Excel Pivot specifications mentioned in the original post (shown below) to determine the proportion affected (incidence rate) with the number born as the denominator.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the specifications for the Excel pivot summarization:&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;The Pivot Table creates the incidence values using the fields of EVENT and BirthDate (summarized as a birth month BMON). In the Pivot Table the column is assigned to EVENT, and the rows to BMON. The summation of values is the COUNT of ID (the unique individual reference number), with the Show Values As option set to "% OF", Base field = EVENT and Base item set as 1_BORN. The resulting values are then displayed as percentages. Of all the individuals born in the month of Feb 2019, 3.5% encountered a pneumonia event is an example result.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an example of the target output from an Excel Pivot Table&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The categories of 1_BORN, SOLD and DIED are constants between different datasets, while the health conditions can be variable in name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this better explains the output goal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for considering this question!&amp;nbsp;&lt;/P&gt;&lt;P&gt;KirkpM&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 17:06:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1502768#M29091</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-18T17:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Life events as a percentage of births</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1503723#M29117</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;=DIVIDE(DISTINCTCOUNT(Table5[ID]),CALCULATE(DISTINCTCOUNT(Table5[ID]),Table5[EVENT]="1_BORN"),0)&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 03:29:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1503723#M29117</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2020-11-19T03:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Life events as a percentage of births</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1505836#M29195</link>
      <description>&lt;P&gt;wdx223_Daniel:&amp;nbsp; Perfect!&amp;nbsp; That is exactly what I was looking for and really solved a big stumbling block.&amp;nbsp; Thank you!&amp;nbsp; KirkpM&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 21:46:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Life-events-as-a-percentage-of-births/m-p/1505836#M29195</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-19T21:46:58Z</dc:date>
    </item>
  </channel>
</rss>

