Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Measure to create Ranking by Date Grouped by 2 column values. What is wrong with this?

Hi,

 

Have a table that contains around 30 fields and around 30,000 rows of data that comes from a direct query, so cannot create a Collumn.

 

I have tried to create a measure that would generate a ranking grouped by Sales Date and Location Machine with the Earliest Actual Start time being the factor to Rank by with the Earliest (date/time)  being 1 and latest date/time in the group being (example) 12 of 12...

 

When I run it I get Arguement "4" in Allexcept function is required.  

 

RunSequence =
VAR A =
    RANKX (
        CALCULATETABLE (
            'ipp IPP_Daily_Report',
            ALLEXCEPT ( 'ipp IPP_Daily_Report', 'ipp IPP_Daily_Report'[location_machine], 'ipp IPP_Daily_Report'[sales_date],)
        ),
        'ipp IPP_Daily_Report'[Earliest Actual Start Time Production],
        ,
        ASC,
        DENSE
    )
VAR B =
    COUNTROWS (
        CALCULATETABLE (
            'ipp IPP_Daily_Report',
            ALLEXCEPT ( 'ipp IPP_Daily_Report', 'ipp IPP_Daily_Report'[sales_date], 'ipp IPP_Daily_Report'[location_machine])
        )
    )
RETURN
    A & "of " & B
1 REPLY 1
johnt75
Super User
Super User

In the first ALLEXCEPT you have an extra comma after sales date.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors