<?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: The current status of the card with granularity up to a week in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637607#M140760</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="674338" data-lia-user-login="Lanik" class="lia-mention lia-mention-user"&gt;Lanik&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I modified the measure, use Status on the Legend :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Current Status = 
VAR __MinDate = MIN('Calendar Auto'[Date] )
VAR __MaxDate = MAX('Calendar Auto'[Date] )
VAR __Result = 

    COUNTROWS( 
        FILTER(
                'Table',
                'Table'[start_date] &amp;gt;= __MinDate &amp;amp;&amp;amp;
                'Table'[end_date] &amp;lt;= __MaxDate
        )
    )   

RETURN
    __Result&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 14 Jan 2024 13:57:13 GMT</pubDate>
    <dc:creator>Fowmy</dc:creator>
    <dc:date>2024-01-14T13:57:13Z</dc:date>
    <item>
      <title>The current status of the card with granularity up to a week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637545#M140756</link>
      <description>&lt;P&gt;Hello everybody!&lt;BR /&gt;It looks like I need help with the DAX code..&lt;BR /&gt;I have a table with columns card_id, status, start_date (when the status starts) and end_date (when the status ends) and Calendar.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have to show a visualization granularity: year - quarter - month - week with counting cards by actual status at the selected hierarchy level. Without date slicer.&lt;BR /&gt;I wrote a measure:&lt;BR /&gt;Count =&lt;BR /&gt;var _MinDate = MIN('Calendar'[date])&lt;BR /&gt;var _MaxDate = MAX('Calendar'[date])&lt;BR /&gt;var _result =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;DISTINCTCOUNT('Card'[card_id]),&lt;BR /&gt;'Card'[start_date] &amp;lt;= _MaxDate,&lt;BR /&gt;'Card'[end_date] &amp;gt; _MinDate,&lt;BR /&gt;FILTERS('Card'[status]),&lt;BR /&gt;REMOVEFILTERS('Calendar')&lt;BR /&gt;)&lt;BR /&gt;return&lt;BR /&gt;_result&lt;/P&gt;&lt;P&gt;but it doesn't work the way I need it to... It shows 1 for each status, but I need the latest status according to the selected granularity.&lt;BR /&gt;I also tried to use dynamic ranking for the latest card's status, but it didn't work..&lt;BR /&gt;Do you have any ideas how to solve this?&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 10:31:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637545#M140756</guid>
      <dc:creator>Lanik</dc:creator>
      <dc:date>2024-01-14T10:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: The current status of the card with granularity up to a week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637578#M140757</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="674338" data-lia-user-login="Lanik" class="lia-mention lia-mention-user"&gt;Lanik&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you have created a relationship between your table and the calendar table, remove it and add this measure:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Current Status = 
VAR __MinDate = MIN('Calendar Auto'[Date] )
VAR __MaxDate = MAX('Calendar Auto'[Date] )
VAR __Result = 
   
   MAXX( 
        FILTER(
                'Table',
                'Table'[start_date] &amp;gt;= __MinDate &amp;amp;&amp;amp;
                'Table'[end_date] &amp;lt;= __MaxDate
        ),
        'Table'[status]
    )

RETURN
    __Result&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Result, change the dates to see the current status by ID: File is attached below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 12:16:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637578#M140757</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2024-01-14T12:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: The current status of the card with granularity up to a week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637593#M140758</link>
      <description>&lt;P&gt;Thanks! But that's not exactly what I need..&amp;nbsp; My main goal is to show on a stacked column chart the number of cards by actual status. Like this for card_id = 1&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 13:01:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637593#M140758</guid>
      <dc:creator>Lanik</dc:creator>
      <dc:date>2024-01-14T13:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: The current status of the card with granularity up to a week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637607#M140760</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="674338" data-lia-user-login="Lanik" class="lia-mention lia-mention-user"&gt;Lanik&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I modified the measure, use Status on the Legend :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Current Status = 
VAR __MinDate = MIN('Calendar Auto'[Date] )
VAR __MaxDate = MAX('Calendar Auto'[Date] )
VAR __Result = 

    COUNTROWS( 
        FILTER(
                'Table',
                'Table'[start_date] &amp;gt;= __MinDate &amp;amp;&amp;amp;
                'Table'[end_date] &amp;lt;= __MaxDate
        )
    )   

RETURN
    __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 14 Jan 2024 13:57:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637607#M140760</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2024-01-14T13:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: The current status of the card with granularity up to a week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637646#M140764</link>
      <description>&lt;P&gt;But we have to countrows only with maxx status&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 16:02:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637646#M140764</guid>
      <dc:creator>Lanik</dc:creator>
      <dc:date>2024-01-14T16:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: The current status of the card with granularity up to a week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637736#M140771</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="674338" data-lia-user-login="Lanik" class="lia-mention lia-mention-user"&gt;Lanik&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Share some more sample or dummy data with the expected result.&lt;BR /&gt;You can either paste your data in the reply box or&amp;nbsp;save it in OneDrive, Google Drive, or any other cloud-sharing platform and share the link here.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 19:52:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3637736#M140771</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2024-01-14T19:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: The current status of the card with granularity up to a week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3638156#M140806</link>
      <description>&lt;P&gt;I have two tables: a calendar (I need a time hierarchy for a stacked column chart) and a table with cards and their status changes. We do not use a calendar slicer, only a hierarchy for a stacked column chart.&lt;BR /&gt;I expect my&amp;nbsp;stacked column chart with a level hierarchy (year - quarter - months - weeks) will show me the number of cards with the latest status&amp;nbsp;at the selected level of hierarchy.&lt;BR /&gt;For examle, in 2023 I expected 2 cards, one with the closed status and the second with the active status (because card_id = 1 had status closed on 31.12.2023 and card_id =2 had status active on&amp;nbsp; 31.12.2023), but if &amp;nbsp;I go to the next level of time hierarchy the card status may differ because the last day at this hierarchy level will be&amp;nbsp;31.03.2023 for quarter 1, 30.06.2023 for&amp;nbsp;quarter 2 and etc.&lt;BR /&gt;Now my measure calculates the number of cards with all statuses, and not with the last status at the selected hierarchy level..&lt;BR /&gt;Thank you for your help and I'm sorry if my&amp;nbsp;explanation is not very clear.&lt;BR /&gt;Here is a link to the tables with data&amp;nbsp;&lt;A href="https://docs.google.com/spreadsheets/d/e/2PACX-1vRZnle7DXDpVOb4jLKc228GCv6_noms5aFzHut2Q34MrQx5Dct7p6LMq7f3EhrGAGIdHwz4OK4Mpl-B/pubhtml" target="_blank"&gt;https://docs.google.com/spreadsheets/d/e/2PACX-1vRZnle7DXDpVOb4jLKc228GCv6_noms5aFzHut2Q34MrQx5Dct7p6LMq7f3EhrGAGIdHwz4OK4Mpl-B/pubhtml&amp;nbsp;&lt;/A&gt;&lt;BR /&gt;and here is PBI file:&amp;nbsp; &lt;A href="https://drive.google.com/file/d/1iGyOKzbkqsNdKLzEywCuZqaTTZW2NKIZ/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1iGyOKzbkqsNdKLzEywCuZqaTTZW2NKIZ/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 05:21:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-current-status-of-the-card-with-granularity-up-to-a-week/m-p/3638156#M140806</guid>
      <dc:creator>Lanik</dc:creator>
      <dc:date>2024-01-15T05:21:04Z</dc:date>
    </item>
  </channel>
</rss>

