<?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 [Help] Add a Rank column correctly in a Chart of type Table based on the summary metrics in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/3992781#M155557</link>
    <description>&lt;H1&gt;&lt;STRONG&gt;Basic report style&lt;/STRONG&gt;&lt;/H1&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have so far implemented this requirement, but the measurement of 'Rank' in 'Subject Compliance' is incorrect. I achieved the desired effect by limiting the value of the chart filter 'ECG DataUpload'.&lt;/P&gt;&lt;H2&gt;&lt;STRONG&gt;Report content&lt;/STRONG&gt;&lt;/H2&gt;&lt;OL&gt;&lt;LI&gt;The chart type for 'Subject Compliance' is Table. There are three slicers acting as filters, Protocol ID, Site, and Period.Slicer Protocol ID and Period can be selected only in one option. Site supports multiple options and is selected all by default.&lt;/LI&gt;&lt;LI&gt;The first column 'Subject' displayed in 'Subject Compliance' is determined by the filter of the slicer Protocol ID and Site. Not affected by slicer Period screening.&lt;/LI&gt;&lt;LI&gt;The second column of 'ECG DataUpload' displayed for 'Subject Compliance' is an aggregate metric that represents the total number of data uploads for each Subject during the selected statistical Period as determined after the selected Protocol ID selected the Site.&lt;BR /&gt;Measurement 'ECG DataUpload' is affected by the Protocol, Site, and Period of the slicer.&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ECG DataUpload = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        VALUES('Relation_SubjectSite'[Subject]),
        "ECGDataUpload", CALCULATE(
            SUM('DataUpload_Device_Subject-df'[amount]),
            FILTER('DataUpload_Device_Subject-df',
                'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[Subject] = EARLIER('Relation_SubjectSite'[Subject]) &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
            )
        )
    )
RETURN
SUMX(TempTable, IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload]))​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The third column 'ECG DataUpload Format' displayed for 'Subject Compliance' is also an aggregate metric that is the result of the content formatting displayed in the second column, representing the formatted value of the total number of data uploads for each Subject during the selected statistical Period as determined after the Protocol ID selected the Site.&lt;BR /&gt;Measurement 'ECG DataUpload Format' is affected by the Protocol, Site, and Period of the slicer.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ECG DataUpload Format = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        SUMMARIZE('Relation_SubjectSite', 'Relation_SubjectSite'[Subject],
            "ECGDataUpload", CALCULATE(
                SUM('DataUpload_Device_Subject-df'[amount]),
                FILTER('DataUpload_Device_Subject-df',
                    'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
                    'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
                )
            )
        ),
        "TotalMinutes", IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload]),
        "Days", INT(IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload]) / 1440),
        "Hours", INT(MOD(IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload]), 1440) / 60),
        "Minutes", MOD(IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload]), 60)
    ) 
RETURN
MAXX(TempTable, [Days] &amp;amp; " days " &amp;amp; [Hours] &amp;amp; " hours " &amp;amp; [Minutes] &amp;amp; " minutes")​​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H1&gt;&lt;STRONG&gt;Help content&lt;/STRONG&gt;&lt;/H1&gt;&lt;P&gt;As shown in the image content of the Basic report style module, the Subject Compliance also needs to display a &lt;STRONG&gt;'Rank'&amp;nbsp;&lt;/STRONG&gt;column.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The meaning of 'Rank' is that each Subject, determined after the Protocol ID and Site are selected, is ranked according to the metric 'ECG DataUpload' shown in the second column.&lt;BR /&gt;Theoretically expected Rank implementation effect is shown in the figure below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;H1&gt;&lt;STRONG&gt;Wrong Rank demonstration&lt;/STRONG&gt;&lt;/H1&gt;&lt;P&gt;I tried to build a few ‘Rank’ metrics myself, but there were a few issues that made it impossible to achieve the desired display.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem manifestation 1&lt;/STRONG&gt;: The calculated Rank value is incorrect, all of which are 1; However, the slicer can take effect normally and does not affect the display of the Subject.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        SUMMARIZE('Relation_SubjectSite', 'Relation_SubjectSite'[Subject],
            "ECGDataUpload", CALCULATE(
                SUM('DataUpload_Device_Subject-df'[amount]),
                FILTER('DataUpload_Device_Subject-df',
                    'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
                    'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
                )
            )
        ),
        "TotalMinutes", IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload])
    )
RETURN
IF(ISBLANK([ECG DataUpload]),BLANK(),RANKX(TempTable,MAXX(TempTable, [TotalMinutes]),,DESC,DENSE))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Rank = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        SUMMARIZE(
            'Relation_SubjectSite',
            'Relation_SubjectSite'[Subject]
        ),
        "ECGDataUpload", CALCULATE(
            SUM('DataUpload_Device_Subject-df'[amount]),
            'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
            'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
        )
    )
    VAR CurrentECGDataUpload = CALCULATE(
        SUM('DataUpload_Device_Subject-df'[amount]),
        'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
        'DataUpload_Device_Subject-df'[Subject] = SELECTEDVALUE('Relation_SubjectSite'[Subject]) &amp;amp;&amp;amp;
        'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
    )    
RETURN
IF(
    ISBLANK(CurrentECGDataUpload),
    BLANK(),
    RANKX(
        TempTable,
        [ECGDataUpload],
        CurrentECGDataUpload,
        DESC,
        DENSE
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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;&lt;STRONG&gt;Problem manifestation 2&lt;/STRONG&gt;: The calculated Rank value is incorrect, all of which are 1; In addition, after the display of Rank is increased in the diagram, the Subject screened by the slicer becomes invalid, and subjects that do not meet the screening appear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        VALUES('Relation_SubjectSite'[Subject]),
        "ECGDataUpload",CALCULATE(
            SUM('DataUpload_Device_Subject-df'[amount]),
            FILTER('DataUpload_Device_Subject-df',
                'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[Subject] = EARLIER('Relation_SubjectSite'[Subject]) &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
            )
        )
    )   
    -- Computes the ECGDataUpload for the current Subject
    VAR CurrentECGDataUpload = CALCULATE(
        SUM('DataUpload_Device_Subject-df'[amount]),
        FILTER('DataUpload_Device_Subject-df',
            'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
            'DataUpload_Device_Subject-df'[Subject] = SELECTEDVALUE('Relation_SubjectSite'[Subject]) &amp;amp;&amp;amp;
            'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
        )
    )
    -- If there is no data, set ECGDataUpload to 0
    VAR FinalECGDataUpload = IF(ISBLANK(CurrentECGDataUpload), 0, CurrentECGDataUpload)
RETURN
RANKX(TempTable, [ECGDataUpload], FinalECGDataUpload, DESC, DENSE)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Rank = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        VALUES('Relation_SubjectSite'[Subject]),
        "ECGDataUpload",CALCULATE(
            SUM('DataUpload_Device_Subject-df'[amount]),
            FILTER('DataUpload_Device_Subject-df',
                'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[Subject] = EARLIER('Relation_SubjectSite'[Subject]) &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
            )
        )
    )  
RETURN
RANKX(TempTable,
    CALCULATE(SUMX(TempTable, [ECGDataUpload])),
    , DESC, DENSE
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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;&lt;STRONG&gt;Problem manifestation 3&lt;/STRONG&gt;: The calculated Rank value is correct; However, after the display of Rank is increased in the diagram, the Subject filtered by the slicer becomes invalid, and subjects that do not meet the filter appear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank = RANKX(
    ALLSELECTED('Relation_SubjectSite'[Subject]),
    [ECG DataUpload],
    ,
    DESC,
    DENSE
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;H1&gt;&lt;STRONG&gt;Current status&lt;/STRONG&gt;&lt;/H1&gt;&lt;P&gt;I used 'Rank' for the third question type above and fulfilled the predetermined requirement by restricting the chart filter 'ECG DataUpload' to not be empty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank = RANKX(
    ALLSELECTED('Relation_SubjectSite'[Subject]),
    [ECG DataUpload],
    ,
    DESC,
    DENSE
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But in fact, the measurement formula of this Rank is itself wrong, and is a requirement that is implemented through other constraints.&lt;/P&gt;&lt;P&gt;How do you create a Rank measure that itself meets your requirements?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jun 2024 07:33:13 GMT</pubDate>
    <dc:creator>Hugh-Guan</dc:creator>
    <dc:date>2024-06-14T07:33:13Z</dc:date>
    <item>
      <title>[Help] Add a Rank column correctly in a Chart of type Table based on the summary metrics</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/3992781#M155557</link>
      <description>&lt;H1&gt;&lt;STRONG&gt;Basic report style&lt;/STRONG&gt;&lt;/H1&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have so far implemented this requirement, but the measurement of 'Rank' in 'Subject Compliance' is incorrect. I achieved the desired effect by limiting the value of the chart filter 'ECG DataUpload'.&lt;/P&gt;&lt;H2&gt;&lt;STRONG&gt;Report content&lt;/STRONG&gt;&lt;/H2&gt;&lt;OL&gt;&lt;LI&gt;The chart type for 'Subject Compliance' is Table. There are three slicers acting as filters, Protocol ID, Site, and Period.Slicer Protocol ID and Period can be selected only in one option. Site supports multiple options and is selected all by default.&lt;/LI&gt;&lt;LI&gt;The first column 'Subject' displayed in 'Subject Compliance' is determined by the filter of the slicer Protocol ID and Site. Not affected by slicer Period screening.&lt;/LI&gt;&lt;LI&gt;The second column of 'ECG DataUpload' displayed for 'Subject Compliance' is an aggregate metric that represents the total number of data uploads for each Subject during the selected statistical Period as determined after the selected Protocol ID selected the Site.&lt;BR /&gt;Measurement 'ECG DataUpload' is affected by the Protocol, Site, and Period of the slicer.&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ECG DataUpload = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        VALUES('Relation_SubjectSite'[Subject]),
        "ECGDataUpload", CALCULATE(
            SUM('DataUpload_Device_Subject-df'[amount]),
            FILTER('DataUpload_Device_Subject-df',
                'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[Subject] = EARLIER('Relation_SubjectSite'[Subject]) &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
            )
        )
    )
RETURN
SUMX(TempTable, IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload]))​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The third column 'ECG DataUpload Format' displayed for 'Subject Compliance' is also an aggregate metric that is the result of the content formatting displayed in the second column, representing the formatted value of the total number of data uploads for each Subject during the selected statistical Period as determined after the Protocol ID selected the Site.&lt;BR /&gt;Measurement 'ECG DataUpload Format' is affected by the Protocol, Site, and Period of the slicer.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ECG DataUpload Format = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        SUMMARIZE('Relation_SubjectSite', 'Relation_SubjectSite'[Subject],
            "ECGDataUpload", CALCULATE(
                SUM('DataUpload_Device_Subject-df'[amount]),
                FILTER('DataUpload_Device_Subject-df',
                    'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
                    'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
                )
            )
        ),
        "TotalMinutes", IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload]),
        "Days", INT(IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload]) / 1440),
        "Hours", INT(MOD(IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload]), 1440) / 60),
        "Minutes", MOD(IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload]), 60)
    ) 
RETURN
MAXX(TempTable, [Days] &amp;amp; " days " &amp;amp; [Hours] &amp;amp; " hours " &amp;amp; [Minutes] &amp;amp; " minutes")​​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H1&gt;&lt;STRONG&gt;Help content&lt;/STRONG&gt;&lt;/H1&gt;&lt;P&gt;As shown in the image content of the Basic report style module, the Subject Compliance also needs to display a &lt;STRONG&gt;'Rank'&amp;nbsp;&lt;/STRONG&gt;column.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The meaning of 'Rank' is that each Subject, determined after the Protocol ID and Site are selected, is ranked according to the metric 'ECG DataUpload' shown in the second column.&lt;BR /&gt;Theoretically expected Rank implementation effect is shown in the figure below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;H1&gt;&lt;STRONG&gt;Wrong Rank demonstration&lt;/STRONG&gt;&lt;/H1&gt;&lt;P&gt;I tried to build a few ‘Rank’ metrics myself, but there were a few issues that made it impossible to achieve the desired display.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem manifestation 1&lt;/STRONG&gt;: The calculated Rank value is incorrect, all of which are 1; However, the slicer can take effect normally and does not affect the display of the Subject.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        SUMMARIZE('Relation_SubjectSite', 'Relation_SubjectSite'[Subject],
            "ECGDataUpload", CALCULATE(
                SUM('DataUpload_Device_Subject-df'[amount]),
                FILTER('DataUpload_Device_Subject-df',
                    'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
                    'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
                )
            )
        ),
        "TotalMinutes", IF(ISBLANK([ECGDataUpload]), 0, [ECGDataUpload])
    )
RETURN
IF(ISBLANK([ECG DataUpload]),BLANK(),RANKX(TempTable,MAXX(TempTable, [TotalMinutes]),,DESC,DENSE))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Rank = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        SUMMARIZE(
            'Relation_SubjectSite',
            'Relation_SubjectSite'[Subject]
        ),
        "ECGDataUpload", CALCULATE(
            SUM('DataUpload_Device_Subject-df'[amount]),
            'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
            'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
        )
    )
    VAR CurrentECGDataUpload = CALCULATE(
        SUM('DataUpload_Device_Subject-df'[amount]),
        'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
        'DataUpload_Device_Subject-df'[Subject] = SELECTEDVALUE('Relation_SubjectSite'[Subject]) &amp;amp;&amp;amp;
        'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
    )    
RETURN
IF(
    ISBLANK(CurrentECGDataUpload),
    BLANK(),
    RANKX(
        TempTable,
        [ECGDataUpload],
        CurrentECGDataUpload,
        DESC,
        DENSE
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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;&lt;STRONG&gt;Problem manifestation 2&lt;/STRONG&gt;: The calculated Rank value is incorrect, all of which are 1; In addition, after the display of Rank is increased in the diagram, the Subject screened by the slicer becomes invalid, and subjects that do not meet the screening appear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        VALUES('Relation_SubjectSite'[Subject]),
        "ECGDataUpload",CALCULATE(
            SUM('DataUpload_Device_Subject-df'[amount]),
            FILTER('DataUpload_Device_Subject-df',
                'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[Subject] = EARLIER('Relation_SubjectSite'[Subject]) &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
            )
        )
    )   
    -- Computes the ECGDataUpload for the current Subject
    VAR CurrentECGDataUpload = CALCULATE(
        SUM('DataUpload_Device_Subject-df'[amount]),
        FILTER('DataUpload_Device_Subject-df',
            'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
            'DataUpload_Device_Subject-df'[Subject] = SELECTEDVALUE('Relation_SubjectSite'[Subject]) &amp;amp;&amp;amp;
            'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
        )
    )
    -- If there is no data, set ECGDataUpload to 0
    VAR FinalECGDataUpload = IF(ISBLANK(CurrentECGDataUpload), 0, CurrentECGDataUpload)
RETURN
RANKX(TempTable, [ECGDataUpload], FinalECGDataUpload, DESC, DENSE)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Rank = 
    -- Determine the slicer value
    VAR SelectedTenant = SELECTEDVALUE('TenantInformation'[Tenant])
    VAR SelectedSites = VALUES('Relation_SiteTenant'[Site])
    VAR SelectedPeriod = SELECTEDVALUE('Filter_PeriodTenant'[StatisticPeriod])
    -- Determine the date range of statistics according to the slicer Period
    VAR StartDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodStart], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    VAR EndDate = LOOKUPVALUE('Filter_PeriodTenant'[PeriodEnd], 'Filter_PeriodTenant'[Tenant], SelectedTenant, 'Filter_PeriodTenant'[StatisticPeriod], SelectedPeriod)
    -- Build a temporary table to ensure that the Subject displays correctly
    VAR TempTable = ADDCOLUMNS(
        VALUES('Relation_SubjectSite'[Subject]),
        "ECGDataUpload",CALCULATE(
            SUM('DataUpload_Device_Subject-df'[amount]),
            FILTER('DataUpload_Device_Subject-df',
                'DataUpload_Device_Subject-df'[Tenant] = SelectedTenant &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[Site] IN SelectedSites &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[Subject] = EARLIER('Relation_SubjectSite'[Subject]) &amp;amp;&amp;amp;
                'DataUpload_Device_Subject-df'[StatisticDate] &amp;gt;= StartDate &amp;amp;&amp;amp; 'DataUpload_Device_Subject-df'[StatisticDate] &amp;lt;= EndDate
            )
        )
    )  
RETURN
RANKX(TempTable,
    CALCULATE(SUMX(TempTable, [ECGDataUpload])),
    , DESC, DENSE
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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;&lt;STRONG&gt;Problem manifestation 3&lt;/STRONG&gt;: The calculated Rank value is correct; However, after the display of Rank is increased in the diagram, the Subject filtered by the slicer becomes invalid, and subjects that do not meet the filter appear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank = RANKX(
    ALLSELECTED('Relation_SubjectSite'[Subject]),
    [ECG DataUpload],
    ,
    DESC,
    DENSE
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;H1&gt;&lt;STRONG&gt;Current status&lt;/STRONG&gt;&lt;/H1&gt;&lt;P&gt;I used 'Rank' for the third question type above and fulfilled the predetermined requirement by restricting the chart filter 'ECG DataUpload' to not be empty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank = RANKX(
    ALLSELECTED('Relation_SubjectSite'[Subject]),
    [ECG DataUpload],
    ,
    DESC,
    DENSE
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But in fact, the measurement formula of this Rank is itself wrong, and is a requirement that is implemented through other constraints.&lt;/P&gt;&lt;P&gt;How do you create a Rank measure that itself meets your requirements?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 07:33:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/3992781#M155557</guid>
      <dc:creator>Hugh-Guan</dc:creator>
      <dc:date>2024-06-14T07:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: [Help] Add a Rank column correctly in a Chart of type Table based on the summary metrics</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/3992846#M155558</link>
      <description>&lt;P&gt;Sorry, I thought I had fulfilled the requirement by limiting chart filters, but when I added a new column to 'Subject Compliance', the Rank changed in a way I didn't understand.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The current Rank metric expression:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank = RANKX(
    ALLSELECTED('Relation_SubjectSite'[Subject]),
    [ECG DataUpload],
    ,
    DESC,
    DENSE
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Report display&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;New unknown change&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have added a new column of 'first_upload' to the 'Subject Compliance' chart. The first column of Subject and the second 'ECG DataUpload' and the third 'ECG DataUpload Format' are not affected, but the 'Rank' value has changed.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The 'first_upload' is not a metric, but a column in the underlying table in the semantic model. And adding 'first_upload' to the graph does not change the results of the 'Subject' and metric 'ECG DataUpload'.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 08:07:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/3992846#M155558</guid>
      <dc:creator>Hugh-Guan</dc:creator>
      <dc:date>2024-06-14T08:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: [Help] Add a Rank column correctly in a Chart of type Table based on the summary metrics</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/3995332#M155559</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="759845" data-lia-user-login="Hugh-Guan" class="lia-mention lia-mention-user"&gt;Hugh-Guan&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;According to your description, you want to implement the correct sorting and take the slicer values into account. Please provide detailed and complete example data so that we can help you faster. Please hide sensitive information in advance.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Albert He&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 05:11:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/3995332#M155559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-17T05:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: [Help] Add a Rank column correctly in a Chart of type Table based on the summary metrics</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/3997765#M155560</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/a&gt;&amp;nbsp;，&lt;BR /&gt;Thank you for your attention to the problem.&lt;BR /&gt;You mentioned that you may need detailed example data, I'm not sure if the following one meets your requirements.&lt;/P&gt;&lt;P&gt;Uploading attachments is not supported, so I put the sample report on the server, exposed by the URL.&lt;/P&gt;&lt;P&gt;&lt;A href="https://upfile.live/files/14be94da" target="_self"&gt;Example Report share address&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 08:14:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/3997765#M155560</guid>
      <dc:creator>Hugh-Guan</dc:creator>
      <dc:date>2024-06-18T08:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: [Help] Add a Rank column correctly in a Chart of type Table based on the summary metrics</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/3997794#M155561</link>
      <description>&lt;P&gt;Hi Everyone，&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Maybe the problem description is abstract and not easy to understand. I will share the sample report data related to the question asked.&lt;BR /&gt;It seems that uploading attachments is not supported, so share via file link.&lt;BR /&gt;&lt;STRONG&gt;&lt;A href="https://upfile.live/files/14be94da" target="_self"&gt;Sample report&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Each file link is valid for 3 days, and the current link is valid until 08:00:00 UTC on June 21, 2024.&lt;/STRONG&gt;&lt;BR /&gt;If the link fails, I will update it in the reply. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 08:22:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/3997794#M155561</guid>
      <dc:creator>Hugh-Guan</dc:creator>
      <dc:date>2024-06-18T08:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: [Help] Add a Rank column correctly in a Chart of type Table based on the summary metrics</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/4003752#M156217</link>
      <description>&lt;P&gt;Hi Everyone，&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The previous report data link has expired. Update the link below:&lt;/P&gt;&lt;P&gt;&lt;A href="https://upfile.live/download/172da1af/" target="_self"&gt;Sample report.pbix&lt;/A&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the current link is valid until 09:00:00 UTC on June 24, 2024.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 09:28:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/4003752#M156217</guid>
      <dc:creator>Hugh-Guan</dc:creator>
      <dc:date>2024-06-21T09:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: [Help] Add a Rank column correctly in a Chart of type Table based on the summary metrics</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/4019824#M158579</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem has been solved with the help of others.&lt;/P&gt;&lt;P&gt;The Rank expression is created as follows, without providing additional filter restrictions.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank Result = 
VAR CurVal = [ECG DataUpload]
VAR TempTable = 
    FILTER(
        ADDCOLUMNS(
            CROSSJOIN(
                ALLSELECTED('Relation_SubjectSite'[Subject]),
                ALLSELECTED('Subject_FirstUpload-df'[first_upload])
                // ALLSELECTED('Table'[Column])
                // ...
                // If there are other dimension fields to be added to the matrix, please add them here
            ),
            "Val",
                [ECG DataUpload]
        ),
        NOT ISBLANK([Val])
    )
RETURN
IF(NOT ISBLANK(CurVal),RANKX(TempTable,[Val],CurVal,DESC,Dense))  &lt;/LI-CODE&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Need-Help-Add-a-dynamic-rank-column-to-a-chart-of-type-Table/td-p/4010625" target="_self"&gt;Help post the original link&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Hopefully this will help more people.&lt;BR /&gt;&lt;SPAN&gt;work smoothly, happy life!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 06:41:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Add-a-Rank-column-correctly-in-a-Chart-of-type-Table-based/m-p/4019824#M158579</guid>
      <dc:creator>Hugh-Guan</dc:creator>
      <dc:date>2024-07-02T06:41:02Z</dc:date>
    </item>
  </channel>
</rss>

