Forum Discussion
Calculate Min/max column (Dax)
- 4 years ago
You can easily replicate the logic of Excel formula in calcualted column,
- 4 years ago
Hi Saxon10 ,
Please try the following calculated columns:
Column = VAR DMK = CALCULATE ( COUNTROWS ( DATA ), FILTER ( DATA, DATA[item] = EARLIER ( DATA[item] ) && DATA[country code] = "DMK" ) ) RETURN IF ( DMK > 0, "DMK", [country code] )Result = VAR code = CALCULATE ( MAX ( DATA[Column] ), KEEPFILTERS ( DATA[item] = EARLIER ( REPORT[Item] ) ) ) RETURN COALESCE ( code, "NA" )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CNENFRNL ,
in Excel I am applying the following formula =IFERROR(IF(COUNTIFS(A$3:A$12,D3,B$3:B$12,"DMK"),"DMK",INDEX($B:$B,MATCH($D3,$A:$A,0))),"NA") (inbetween two tables)
Winth in table:
=IF(COUNTIFS($A$3:$A$12,$A3,$B$3:$B$12,"DMK"),"DMK",$B3)
- CNENFRNL4 years ago
Community Champion
You can easily replicate the logic of Excel formula in calcualted column,