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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors