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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

MAX VALUE

hi all

somebody can help me?

ABCD
XF120
XG220
YGBLANK15
YG115
YF315
YF415

 

For each value on column A, IF(B="F")&(C isnot "BLANK") , MAX(C)+D/2, Today + D/2

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Please kindly try this custom column.

= if  [C]<> null and [B]="F" then List.Max(Table.Column(#"Changed Type","C"))+[D]/2 else [D]/2

vstephenmsft_0-1661333657016.png

 

List.Max(Table.Column(#"Changed Type","C")) returns the max value of column [C].

I have no idea about the "Today", if it's a column, just add them in to the formula.

 

 

Best Regards,

Stephen Tao

 

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

7 REPLIES 7
Anonymous
Not applicable

Hi @Anonymous ,

 

Please kindly try this custom column.

= if  [C]<> null and [B]="F" then List.Max(Table.Column(#"Changed Type","C"))+[D]/2 else [D]/2

vstephenmsft_0-1661333657016.png

 

List.Max(Table.Column(#"Changed Type","C")) returns the max value of column [C].

I have no idea about the "Today", if it's a column, just add them in to the formula.

 

 

Best Regards,

Stephen Tao

 

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

 

Anonymous
Not applicable

D is a date , so at the end i want to see the date.

in the example i have 2 value in the column A, ma in my database i have different value. for each value in the column a and if i have th especifics condition  IF(B="F")&(C isnot "BLANK") , i want the max date from C and for it i want to calculate the max date + related value in D/2

Still confused .

You keep writing about dates, but I only see whole numbers in your example.

Anonymous
Not applicable

ok do not consider " today "if was 

For each value on column A, IF(B="F")&(C isnot "BLANK") , MAX(C)+D/2, 0

what could be the formula?

 

 

The formula for a "Custom Column" would be:

if [C]<>"BLANK" and [B]="F" 
    then List.Max(List.Transform(#"Previous Step"[C], each try Number.From(_) otherwise null))
  + [D]/2 
     else 0

 

#"Previous Step" refers to the name in the Applied Steps window immediately preceding the custom column step you are working on.

 

The "List.Transform" is done because List.Max does not automatically ignore text entries.

ronrsnfld
Super User
Super User

Please clarify:

For each value on column A: But you only have two values in Column A (X and Y). Do you want to aggregate or what?

Today + D/2: What is the value of Today to be added to D/2?

Anonymous
Not applicable

in the example i have 2 value in the column A, ma in my database i have different value. for each value in the column a and if i have the specifics condition  IF(B="F")&(C isnot "BLANK") , i want the max date from C and for it i want to calculate the max date + related value in D/2

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.