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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculated column using MAXX with multiple calculations as expression

Hi peeps,

I have 3 columns in my table with each containing a decimal number. Now I want a column which displays a number after a calculation has been made. This column needs to display the highest number after these 3 calculations for the 3 different columns ( 1 calculation for each column) has been made.

Formula now:

PW = MAXX(Load;Load[M] * 1750 && Load[W]* 1 && Load[V] * 330)
 This doesn't work it gives me an error "function MAXX cannot work with values of type boolean. probably has something to do with the &&. Not sure how to incoporate the different calculations in MAXX. Any help would be appreciated.
so with this data:
S    |       M    |     W             |  V
1            3          2000             13
2            16        20000           4
3             11,6     24800           200

result should be:
S    |       M    |     W             |  V        | PW
1            3          2000             13        5250
2            16        29000           4           29000
3             11,6     24800           200       66000
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous yes you are right my bad.

Maximum = 
VAR _m = 'Table'[M]*1750
VAR _w = 'Table'[W]*1
VAR _v = 'Table'[V]*330
RETURN MAX(_m,MAX(_w,_v))

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@Anonymous 
please try below calculated column

Maximum = 
VAR _m = 'Table'[M]*1750
VAR _w = 'Table'[W]*1
VAR _v = 'Table'[V]*330
RETURN MAX(a,MAX(b,c))
Anonymous
Not applicable

Where does the a,b,c come from? is this supposed to be _m , _W, _V?

Anonymous
Not applicable

@Anonymous yes you are right my bad.

Maximum = 
VAR _m = 'Table'[M]*1750
VAR _w = 'Table'[W]*1
VAR _v = 'Table'[V]*330
RETURN MAX(_m,MAX(_w,_v))

 

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

You can try adding a column like below.

Column = MAXX( { 'Table'[M] * 1750, 'Table'[W], 'Table'[V] * 330 }, [Value] )

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.