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

Select a Specific Cell on a Table using Conditional Statement

Hello, in the [Count] column, I've wanted to return that value "60" on the [Latest] column that is unique and dependent on the [PO #] column. Its currently returning the value of the last cell in [Count] column which is "360" even though I've already used an IF statement that selects "Today" in [TODAY_SELECTOR ] column and "DAY" in [SHIFT SELECTOR] column.

So how do I get the value of 60 as it is the Latest Value in the "Today" and "Day Shift" of my data?
attached below is the image of my PowerBI.

hlp.png

Thank you!

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Replace MAXX() with :

CALCULATE(MAX('Table'[COUNT]),FILTER('Table','Table'[PO #]=EARLIER('Table'[PO #])&&'Table'[SHIFT SELECTOR]="DAY"&&'Table'[TODAY SELECTOR]="TODAY"))

Vlianlmsft_0-1649821508714.png

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Replace MAXX() with :

CALCULATE(MAX('Table'[COUNT]),FILTER('Table','Table'[PO #]=EARLIER('Table'[PO #])&&'Table'[SHIFT SELECTOR]="DAY"&&'Table'[TODAY SELECTOR]="TODAY"))

Vlianlmsft_0-1649821508714.png

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HotChilli
Super User
Super User

Add the TODAY_SELECTOR and SHIFT_SELECTOR to the FILTER.

At the moment the FILTER creates a table of ALL the COUNT values for the  current PO# ( even though it only does that for the rows that meet the conditions in the IF statement)

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.