<?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 Measure with default calculation in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Measure-with-default-calculation/m-p/951068#M22513</link>
    <description>&lt;P&gt;&lt;FONT size="2"&gt;We have a table where we aggregate the total no of staffs per month and I have created the measure as below.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Total Employee = Sum(StaffCount)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;However, when the measure is selected , it shows a value of 2m+ statffcount which is the total staff records in that table.&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="2"&gt;The current month 202002 has a staff count of 25k and I want the measure to show this number by default. i.e =calculate(Sum(StaffCount), (FILTER('Date','Date'[CurrentMonth] = "yes"))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;However, when the end user brings in the month dimension, I want it to default to&amp;nbsp;Sum(StaffCount) so they can see the staff movement over time.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I am thinking along the line of&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;If value from the date [date].[datekey] dimension is detected, Sum(StaffCount) else&amp;nbsp;calculate(Sum(StaffCount), (FILTER('Date','Date'[CurrentMonth] = "yes"))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Please advise.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2020 15:01:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-02-27T15:01:31Z</dc:date>
    <item>
      <title>Measure with default calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Measure-with-default-calculation/m-p/951068#M22513</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;We have a table where we aggregate the total no of staffs per month and I have created the measure as below.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Total Employee = Sum(StaffCount)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;However, when the measure is selected , it shows a value of 2m+ statffcount which is the total staff records in that table.&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="2"&gt;The current month 202002 has a staff count of 25k and I want the measure to show this number by default. i.e =calculate(Sum(StaffCount), (FILTER('Date','Date'[CurrentMonth] = "yes"))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;However, when the end user brings in the month dimension, I want it to default to&amp;nbsp;Sum(StaffCount) so they can see the staff movement over time.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I am thinking along the line of&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;If value from the date [date].[datekey] dimension is detected, Sum(StaffCount) else&amp;nbsp;calculate(Sum(StaffCount), (FILTER('Date','Date'[CurrentMonth] = "yes"))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Please advise.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 15:01:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Measure-with-default-calculation/m-p/951068#M22513</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T15:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Measure with default calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Measure-with-default-calculation/m-p/951112#M22514</link>
      <description>&lt;P&gt;Well, you would have to write your measure to essentially have an IF statement in it that would check your date dimension. More or less impossible to be more detailed with the level of information provided.&amp;nbsp;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;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 14:38:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Measure-with-default-calculation/m-p/951112#M22514</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-02-27T14:38:15Z</dc:date>
    </item>
  </channel>
</rss>

