Forum Discussion
Finding Max Value
Hello,
I am trying to create a DAX which will find the Max value between 2 different columns. Excel for and screenshot given below,
Please advice.
Warm Regards
Varun Raj
Hi varunv11
The calculated column you want to add is really just the maximum value so far in the P/L $ column.
You could use a DAX calculated column like this:
Max so far = VAR CurrentDateTime = Data[Date] + Data[Time] RETURN CALCULATE ( MAX ( Data[P/L $] ), ALL ( Data ), FILTER ( ALL ( Data[Date], Data[Time] ), Data[Date] + Data[Time] <= CurrentDateTime ) )Regards,
Owen
7 Replies
- quentin_vigneSolution Sage
Hi varunv11
You simply have to write :
MaxValue = MAX(['YourTable'[P/L $];'YourTable'[Column2])
- Quentin
- varunv11Frequent Visitor
Thanks quentin_vigne
I did that but the requirement is to find max of PL value with the above value on the other column.
This is more like running total but here we are looking for max value between 2 values.
Please advise.
Warm Regards
Varun Raj
- FloriankxSolution Sage
Hello,
I think your requirement isn't absolutely clear.
If you search Max depending on specfic value you need
MaxOfValue=CALCULATE(MAX([SearchColumn]),FILTER(Table,[FactColumn]=SearchValue))
If you just want to find the maximum value quentin_vigne is absolutely correct.
Please give us a more precise example with your expected result.
Best regards.
- varunv11Frequent Visitor
Hello,
I am trying to create a formula which will find the Max value between one above and one parallel values on two columns. Excel for and screenshot given below,
I feel this is more like cumulative total or a running total but here i need to find the max of PL with above column.
Please advice.
Warm Regards
Varun Raj