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
PPalkowski
Helper II
Helper II

Table that filters based on max of calculated column

I'm trying to create a table where the line in my current formula ....

"Max Value", CALCULATE(MAX(CIAssignees[HadIssues]),FILTER(CIAssignees,CIAssignees[month]=EARLIER(CIAssignees[month]))))

 

is greater than two. Is there a way to do that?

 

MyTable =
CALCULATETABLE (
SUMMARIZE (
'CIAssignees',
'CIAssignees'[FN_Assigned TO],'CIAssignees'[MonthNo],
    'CIAssignees'[Month],
'CIAssignees'[HadIssues],
"Max Value", CALCULATE(MAX(CIAssignees[HadIssues]),FILTER(CIAssignees,CIAssignees[month]=EARLIER(CIAssignees[month])))),
 
CIAssignees[HadIssues] > 0)
1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @PPalkowski .

 

Try this

 

New Table =
SUMMARIZE (
    'CIAssignees',
    'CIAssignees'[FN_Assigned TO],
    'CIAssignees'[MonthNo],
    'CIAssignees'[Month],
    'CIAssignees'[HadIssues],
    "Max Value", CALCULATE (
        MAX ( CIAssignees[HadIssues] ),
        FILTER (
            CIAssignees,
            CIAssignees[month]
                = MAX ( CIAssignees[month] )
                && CIAssignees[HadIssues] > 0
        )
    )

 

Regards,

Harsh Nathani

 

View solution in original post

4 REPLIES 4
harshnathani
Community Champion
Community Champion

Hi @PPalkowski .

 

Try this

 

New Table =
SUMMARIZE (
    'CIAssignees',
    'CIAssignees'[FN_Assigned TO],
    'CIAssignees'[MonthNo],
    'CIAssignees'[Month],
    'CIAssignees'[HadIssues],
    "Max Value", CALCULATE (
        MAX ( CIAssignees[HadIssues] ),
        FILTER (
            CIAssignees,
            CIAssignees[month]
                = MAX ( CIAssignees[month] )
                && CIAssignees[HadIssues] > 0
        )
    )

 

Regards,

Harsh Nathani

 

AntrikshSharma
Super User
Super User

The code seems to be incorrect, inside CALCULATE row context is destroyed but you are using EARLIER inside it, are you using EARLIER as a function that returns previous row? because it is supposed to return the same value in the previous Row context.
lbendlin
Super User
Super User

yes, you need to add another filter of all the HadIssues > 2.  And you will want to think how to handle the situation where this filter comes back empty.

Lets start with what I am looking for,

Each FN_Assigned TO submits several items per month, as little as one as much as 100.

Those , submissions must meet requirements, if ANY submissions for that month had an issue, it would be indicated in the HadIssue column.

What I am trying to do is create a table of ONLY FN_Assigned TOs that had at least one issue in each of the three months, Mar through May,

So from this sample source

FN Assigned To

Mon

HadIssues

Bruce

Mar

15

Bruce

Apr

3

Bruce

May

1

Clark

Mar

42

Clark

Apr

0

Clark

May

126

Hal

Mar

1

Hal

Apr

1

Hal

May

1

 

My preferred created table would be

FN Assigned To

Results

Bruce

3

Hal

3

 

 

 

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.