DRSteele
Well-known Member
- Joined
- Mar 31, 2015
- Messages
- 2,659
- Office Version
- 365
- Platform
- Windows
Can someone please help me in Power Query?
I would like a custom column to report the maximum magnitude of values per record, in other words I would like the max absolute values. The column names are on row 30. It seems easy in Excel, but I can't figure out the syntax in PQ.
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]31[/TD]
[TD="align: right"]8/23/2017[/TD]
[TD="align: right"]-2.1[/TD]
[TD="align: right"]-0.1[/TD]
[TD="align: right"]-0.1[/TD]
[TD="align: right"]-1.1[/TD]
[TD="align: right"]-1.1[/TD]
[TD="align: right"]-3.1[/TD]
[TD="align: right"]-6.1[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]6.1[/TD]
[TD="align: center"]32[/TD]
[TD="align: right"]8/24/2017[/TD]
[TD="align: right"]-1.5[/TD]
[TD="align: right"]-1.5[/TD]
[TD="align: right"]-3.5[/TD]
[TD="align: right"]-2.5[/TD]
[TD="align: right"]-2.5[/TD]
[TD="align: right"]-4.5[/TD]
[TD="align: right"]-0.5[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]4.5[/TD]
[TD="align: center"]33[/TD]
[TD="align: right"]8/25/2017[/TD]
[TD="align: right"]-0.2[/TD]
[TD="align: right"]-0.2[/TD]
[TD="align: right"]-0.2[/TD]
[TD="align: right"]-1.2[/TD]
[TD="align: right"]-1.2[/TD]
[TD="align: right"]-1.2[/TD]
[TD="align: right"]-1.2[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]1.2[/TD]
[TD="align: center"]34[/TD]
[TD="align: right"]8/26/2017[/TD]
[TD="align: right"]-1.8[/TD]
[TD="align: right"]0.2[/TD]
[TD="align: right"]0.2[/TD]
[TD="align: right"]0.2[/TD]
[TD="align: right"]-0.8[/TD]
[TD="align: right"]-1.8[/TD]
[TD="align: right"]-2.8[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]2.8[/TD]
[TD="align: center"]35[/TD]
[TD="align: right"]8/27/2017[/TD]
[TD="align: right"]-2.1[/TD]
[TD="align: right"]-1.1[/TD]
[TD="align: right"]-2.1[/TD]
[TD="align: right"]-1.1[/TD]
[TD="align: right"]-1.1[/TD]
[TD="align: right"]-3.1[/TD]
[TD="align: right"]-5.1[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]5.1[/TD]
</tbody>
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]I31[/TH]
[TD="align: left"]{=MAX(ABS(B31:H31))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]
I would like a custom column to report the maximum magnitude of values per record, in other words I would like the max absolute values. The column names are on row 30. It seems easy in Excel, but I can't figure out the syntax in PQ.
A | B | C | D | E | F | G | H | I | |
---|---|---|---|---|---|---|---|---|---|
Forecast Day | Max Magnitude | ||||||||
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]31[/TD]
[TD="align: right"]8/23/2017[/TD]
[TD="align: right"]-2.1[/TD]
[TD="align: right"]-0.1[/TD]
[TD="align: right"]-0.1[/TD]
[TD="align: right"]-1.1[/TD]
[TD="align: right"]-1.1[/TD]
[TD="align: right"]-3.1[/TD]
[TD="align: right"]-6.1[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]6.1[/TD]
[TD="align: center"]32[/TD]
[TD="align: right"]8/24/2017[/TD]
[TD="align: right"]-1.5[/TD]
[TD="align: right"]-1.5[/TD]
[TD="align: right"]-3.5[/TD]
[TD="align: right"]-2.5[/TD]
[TD="align: right"]-2.5[/TD]
[TD="align: right"]-4.5[/TD]
[TD="align: right"]-0.5[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]4.5[/TD]
[TD="align: center"]33[/TD]
[TD="align: right"]8/25/2017[/TD]
[TD="align: right"]-0.2[/TD]
[TD="align: right"]-0.2[/TD]
[TD="align: right"]-0.2[/TD]
[TD="align: right"]-1.2[/TD]
[TD="align: right"]-1.2[/TD]
[TD="align: right"]-1.2[/TD]
[TD="align: right"]-1.2[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]1.2[/TD]
[TD="align: center"]34[/TD]
[TD="align: right"]8/26/2017[/TD]
[TD="align: right"]-1.8[/TD]
[TD="align: right"]0.2[/TD]
[TD="align: right"]0.2[/TD]
[TD="align: right"]0.2[/TD]
[TD="align: right"]-0.8[/TD]
[TD="align: right"]-1.8[/TD]
[TD="align: right"]-2.8[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]2.8[/TD]
[TD="align: center"]35[/TD]
[TD="align: right"]8/27/2017[/TD]
[TD="align: right"]-2.1[/TD]
[TD="align: right"]-1.1[/TD]
[TD="align: right"]-2.1[/TD]
[TD="align: right"]-1.1[/TD]
[TD="align: right"]-1.1[/TD]
[TD="align: right"]-3.1[/TD]
[TD="align: right"]-5.1[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]5.1[/TD]
</tbody>
Query2
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]I31[/TH]
[TD="align: left"]{=MAX(ABS(B31:H31))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]