The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All I have mention below data.
Need to apply formula to get the data.
Reference | Amountindoccurr | Concatenate | Sum | CountIF | MR8M |
000000079314 | -22000 | 00000007931422000 | -22000 | 3 | 1 |
000000079314 | 22000 | 00000007931422000 | -22000 | 3 | 1 |
000000079314 | -22000 | 00000007931422000 | -22000 | 3 | 1 |
000000080007CO | -7500 | 000000080007CO7500 | -7500 | 1 | 0 |
0000009 | -1500 | 00000091500 | -1500 | 1 | 0 |
0000035 | -750 | 0000035750 | -750 | 1 | 0 |
0000053314 | -2500 | 00000533142500 | -2500 | 1 | 0 |
0000053475 | -225 | 0000053475225 | -225 | 1 | 0 |
0000068 | -610 | 0000068610 | -610 | 1 | 0 |
0000103 | -580 | 0000103580 | -580 | 1 | 0 |
0000111702 | -780 | 0000111702780 | -780 | 1 | 0 |
00001166100 | -138239.79 | 00001166100138239.79 | -138240 | 1 | 0 |
00001167721 | -138239.79 | 00001167721138239.79 | -138240 | 1 | 0 |
000013 | 10000 | 00001310000 | 0 | 2 | 0 |
0000143884 | -7339.5 | 00001438847339.5 | -7339.5 | 1 | 0 |
0000154 | -7500 | 00001547500 | -7500 | 3 | 1 |
0000154 | 7500 | 00001547500 | -7500 | 3 | 1 |
0000154 | -7500 | 00001547500 | -7500 | 3 | 1 |
00001A | -10000 | 00001A10000 | -10000 | 1 | 0 |
0000357140 | -6491.52 | 00003571406491.52 | -6491.52 | 1 | 0 |
0000357818 | -5091.66 | 00003578185091.66 | -5091.66 | 1 | 0 |
0000358656 | -6843.2 | 00003586566843.2 | -6843.2 | 1 | 0 |
0000358864 | -6843.2 | 00003588646843.2 | -6843.2 | 1 | 0 |
0000358924 | -2217.98 | 00003589242217.98 | -2217.98 | 1 | 0 |
0000358947 | -2216.34 | 00003589472216.34 | -2216.34 | 1 | 0 |
0000358949 | -2417.52 | 00003589492417.52 | -2417.52 | 1 | 0 |
0000358952 | -7623.28 | 00003589527623.28 | -7623.28 | 1 | 0 |
0000358953 | -15024.24 | 000035895315024.24 | -15024.2 | 1 | 0 |
0000358997 | -2417.92 | 00003589972417.92 | -2417.92 | 1 | 0 |
0000359027 | -1977.86 | 00003590271977.86 | -1977.86 | 1 | 0 |
0000359050 | -2441.12 | 00003590502441.12 | -2441.12 | 1 | 0 |
0000359210 | -1365.84 | 00003592101365.84 | -1365.84 | 1 | 0 |
0000359210 | -1905.82 | 00003592101905.82 | -1905.82 | 1 | 0 |
0000359210 | -3706.24 | 00003592103706.24 | -3706.24 | 1 | 0 |
0000359210 | -4902.78 | 00003592104902.78 | -4902.78 | 1 | 0 |
0000359217 | -1365.84 | 00003592171365.84 | -1365.84 | 1 | 0 |
0000359217 | -2115.36 | 00003592172115.36 | -2115.36 | 1 | 0 |
0000359729 | -1981.51 | 00003597291981.51 | -1981.51 | 1 | 0 |
0000359746 | -1977.86 | 00003597461977.86 | -3955.72 | 2 | 0 |
0000359746 | -1977.86 | 00003597461977.86 | -3955.72 | 2 | 0 |
0000359746 | -4902.78 | 00003597464902.78 | -4902.78 | 1 | 0 |
0000359751 | -3903.74 | 00003597513903.74 | -3903.74 | 1 | 0 |
0000359783 | -7623.28 | 00003597837623.28 | -7623.28 | 1 | 0 |
0000359804 | -2417.52 | 00003598042417.52 | -2417.52 | 1 | 0 |
0000359805 | -2417.52 | 00003598052417.52 | -2417.52 | 1 | 0 |
0000359807 | -4902.78 | 00003598074902.78 | -4902.78 | 1 | 0 |
0000359807 | -5755.34 | 00003598075755.34 | -5755.34 | 1 | 0 |
0000359827 | -2155.01 | 00003598272155.01 | -2155.01 | 1 | 0 |
0000359830 | -2417.52 | 00003598302417.52 | -2417.52 | 1 | 0 |
0000359839 | -4435.98 | 00003598394435.98 | -4435.98 | 1 | 0 |
0000359841 | -2417.52 | 00003598412417.52 | -2417.52 | 1 | 0 |
0000359842 | -2217.98 | 00003598422217.98 | -4435.96 | 2 | 0 |
0000359842 | -2217.98 | 00003598422217.98 | -4435.96 | 2 | 0 |
0000359883 | -4435.98 | 00003598834435.98 | -4435.98 | 1 | 0 |
0000359909 | -2597.06 | 00003599092597.06 | -2597.06 | 1 | 0 |
0000359939 | -1494.72 | 00003599391494.72 | -1494.72 | 1 | 0 |
0000359942 | -2216.34 | 00003599422216.34 | -2216.34 | 1 | 0 |
0000359944 | -5234.69 | 00003599445234.69 | -10469.4 | 2 | 0 |
0000359944 | -15585.8 | 000035994415585.8 | -46757.4 | 3 | 0 |
0000359944 | -5234.69 | 00003599445234.69 | -10469.4 | 2 | 0 |
0000359944 | -15585.8 | 000035994415585.8 | -46757.4 | 3 | 0 |
0000359944 | -15585.8 | 000035994415585.8 | -46757.4 | 3 | 0 |
0000359977 | -15585.8 | 000035997715585.8 | -15585.8 | 1 | 0 |
0000360003 | -3577.64 | 00003600033577.64 | -7155.28 | 2 | 0 |
0000360003 | -2551.43 | 00003600032551.43 | -7654.29 | 3 | 0 |
000080052658 | -23782.62 | 00008005265823782.62 | -23782.6 | 1 | 0 |
000080169978 | -5559.35 | 0000801699785559.35 | -5559.35 | 1 | 0 |
000080219852 | -23782.62 | 00008021985223782.62 | -23782.6 | 1 | 0 |
000080220447 | -6710.18 | 0000802204476710.18 | -6710.18 | 1 | 0 |
000080317998 | -5765.01 | 0000803179985765.01 | -5765.01 | 1 | 0 |
000080323215 | -36866.66 | 00008032321536866.66 | -36866.7 | 1 | 0 |
000080400574 | -23782.62 | 00008040057423782.62 | -23782.6 | 1 | 0 |
000080556495 | -23782.62 | 00008055649523782.62 | -23782.6 | 1 | 0 |
000080661862 | -36866.66 | 00008066186236866.66 | -36866.7 | 1 | 0 |
000080661870 | -36866.66 | 00008066187036866.66 | -36866.7 | 1 | 0 |
000080661908 | -36866.66 | 00008066190836866.66 | -36866.7 | 1 | 0 |
000080746270 | -36866.66 | 00008074627036866.66 | -36866.7 | 1 | 0 |
000080746319 | -36866.66 | 00008074631936866.66 | -36866.7 | 1 | 0 |
000080746369 | -36866.66 | 00008074636936866.66 | -36866.7 | 1 | 0 |
000080746548 | -36866.66 | 00008074654836866.66 | -36866.7 | 1 | 0 |
000080746597 | -36866.66 | 00008074659736866.66 | -36866.7 | 1 | 0 |
000080807757 | -23782.62 | 00008080775723782.62 | -23782.6 | 1 | 0 |
000080860392 | -7382.5 | 0000808603927382.5 | -7382.5 | 1 | 0 |
000081033565 | -23782.62 | 00008103356523782.62 | -23782.6 | 1 | 0 |
000081033998 | -23782.62 | 00008103399823782.62 | -23782.6 | 1 | 0 |
000081034251 | -23782.62 | 00008103425123782.62 | -23782.6 | 1 | 0 |
000081034359 | -23782.62 | 00008103435923782.62 | -23782.6 | 1 | 0 |
000081037536 | -36866.66 | 00008103753636866.66 | -36866.7 | 1 | 0 |
000081090212 | -6544.56 | 0000810902126544.56 | -6544.56 | 1 | 0 |
000081154275 | -36866.66 | 00008115427536866.66 | -36866.7 | 1 | 0 |
000081228935 | -23782.62 | 00008122893523782.62 | -23782.6 | 1 | 0 |
000081544261 | -23782.62 | 00008154426123782.62 | -23782.6 | 1 | 0 |
000081575694 | -23782.62 | 00008157569423782.62 | -23782.6 | 1 | 0 |
000081708242 | -3557.61 | 0000817082423557.61 | -3557.61 | 1 | 0 |
000081740534 | -36866.66 | 00008174053436866.66 | -36866.7 | 1 | 0 |
000081764801 | -23782.62 | 00008176480123782.62 | -23782.6 | 1 | 0 |
000081764981 | -23782.62 | 00008176498123782.62 | -23782.6 | 1 | 0 |
000081765214 | -28308.06 | 00008176521428308.06 | -28308.1 | 1 | 0 |
000081765527 | -4027.84 | 0000817655274027.84 | -4027.84 | 1 | 0 |
000081769705 | -36866.66 | 00008176970536866.66 | -36866.7 | 1 | 0 |
000081769732 | -36866.66 | 00008176973236866.66 | -36866.7 | 1 | 0 |
000081789245 | -24285.75 | 00008178924524285.75 | -24285.8 | 1 | 0 |
000081860714 | -36866.66 | 00008186071436866.66 | -36866.7 | 1 | 0 |
000081860724 | -36866.66 | 00008186072436866.66 | -36866.7 | 1 | 0 |
000081909702 | -23782.62 | 00008190970223782.62 | -23782.6 | 1 | 0 |
000081909862 | -14669.89 | 00008190986214669.89 | -14669.9 | 1 | 0 |
000081910259 | -23782.62 | 00008191025923782.62 | -23782.6 | 1 | 0 |
000081936518 | -36866.66 | 00008193651836866.66 | -36866.7 | 1 | 0 |
000081959029 | -24285.75 | 00008195902924285.75 | -24285.8 | 1 | 0 |
000082069809 | -3557.61 | 0000820698093557.61 | -3557.61 | 1 | 0 |
000082069810 | -3557.61 | 0000820698103557.61 | -3557.61 | 1 | 0 |
000082069813 | -3557.61 | 0000820698133557.61 | -3557.61 | 1 | 0 |
000082069918 | -3177.89 | 0000820699183177.89 | -3177.89 | 1 | 0 |
000082069921 | -3177.89 | 0000820699213177.89 | -3177.89 | 1 | 0 |
000082069924 | -3177.89 | 0000820699243177.89 | -3177.89 | 1 | 0 |
000082124391 | -23782.62 | 00008212439123782.62 | -23782.6 | 1 | 0 |
000082129754 | -36866.66 | 00008212975436866.66 | -36866.7 | 1 | 0 |
000082155009 | -3177.89 | 0000821550093177.89 | -3177.89 | 1 | 0 |
000082237596 | -23782.62 | 00008223759623782.62 | -23782.6 | 1 | 0 |
000082237619 | -14669.89 | 00008223761914669.89 | -14669.9 | 1 | 0 |
000082237659 | -14669.89 | 00008223765914669.89 | -14669.9 | 1 | 0 |
000082263438 | -36866.66 | 00008226343836866.66 | -36866.7 | 1 | 0 |
000082263440 | -36866.66 | 00008226344036866.66 | -36866.7 | 1 | 0 |
000082274976 | -36866.66 | 00008227497636866.66 | -36866.7 | 1 | 0 |
000082275056 | -23782.62 | 00008227505623782.62 | -23782.6 | 1 | 0 |
000082400188 | -4695.73 | 0000824001884695.73 | -4695.73 | 1 | 0 |
000082426591 | -36866.66 | 00008242659136866.66 | -36866.7 | 1 | 0 |
000082427476 | -13542.88 | 00008242747613542.88 | -13542.9 | 1 | 0 |
000082454098 | -3177.89 | 0000824540983177.89 | -3177.89 | 1 | 0 |
000082454108 | -3177.89 | 0000824541083177.89 | -3177.89 | 1 | 0 |
000082454110 | -14669.89 | 00008245411014669.89 | -14669.9 | 1 | 0 |
000082454148 | -36866.66 | 00008245414836866.66 | -36866.7 | 1 | 0 |
000082474871 | -33024.68 | 00008247487133024.68 | -33024.7 | 1 | 0 |
000082475444 | -9524.05 | 0000824754449524.05 | -9524.05 | 1 | 0 |
000082484424 | -3177.89 | 0000824844243177.89 | -3177.89 | 1 | 0 |
000082484870 | -5107.11 | 0000824848705107.11 | -5107.11 | 1 | 0 |
000082484876 | -4408.54 | 0000824848764408.54 | -4408.54 | 1 | 0 |
000082484886 | -4408.54 | 0000824848864408.54 | -4408.54 | 1 | 0 |
000082484894 | -5223.38 | 0000824848945223.38 | -5223.38 | 1 | 0 |
000082485079 | -4408.54 | 0000824850794408.54 | -4408.54 | 1 | 0 |
000082485207 | -940.25 | 000082485207940.25 | -940.25 | 1 | 0 |
000082530541 | -5164.9 | 0000825305415164.9 | -5164.9 | 1 | 0 |
000082530981 | -4695.73 | 0000825309814695.73 | -4695.73 | 1 | 0 |
000082531004 | -5784.55 | 0000825310045784.55 | -5784.55 | 1 | 0 |
000082531016 | -4695.73 | 0000825310164695.73 | -4695.73 | 1 | 0 |
000082531017 | -5016.53 | 0000825310175016.53 | -5016.53 | 1 | 0 |
000082531045 | -5304.83 | 0000825310455304.83 | -5304.83 | 1 | 0 |
000082531099 | -5376.61 | 0000825310995376.61 | -5376.61 | 1 | 0 |
000082531150 | -4027.84 | 0000825311504027.84 | -4027.84 | 1 | 0 |
000082531216 | -28308.06 | 00008253121628308.06 | -28308.1 | 1 | 0 |
000082536356 | -33024.68 | 00008253635633024.68 | -33024.7 | 1 | 0 |
000082555185 | -2650.41 | 0000825551852650.41 | -2650.41 | 1 | 0 |
000082555727 | -6679.64 | 0000825557276679.64 | -6679.64 | 1 | 0 |
000082576746 | -8581.62 | 0000825767468581.62 | -8581.62 | 1 | 0 |
000082576903 | -5107.11 | 0000825769035107.11 | -5107.11 | 1 | 0 |
000082576908 | -4408.54 | 0000825769084408.54 | -8817.08 | 2 | 0 |
000082576908 | -4408.54 | 0000825769084408.54 | -8817.08 | 2 | 0 |
000082576910 | -4408.54 | 0000825769104408.54 | -8817.08 | 2 | 0 |
Solved! Go to Solution.
@KuntalSingh, go ahead and try it, and if you hit any snags, just reach out.
in power query, create a new column
= Table.AddColumn(YourTableName, "ConcatenatedColumn", each [A] & Number.ToText(Number.Abs([B])))
SUMIF:
let
GroupedTable = Table.Group(YourTableName, {"C"}, {{"SumColumn", each List.Sum([B]), type number}}),
MergedTable = Table.NestedJoin(YourTableName, {"C"}, GroupedTable, {"C"}, "MergedColumn", JoinKind.LeftOuter),
ExpandedTable = Table.ExpandTableColumn(MergedTable, "MergedColumn", {"SumColumn"}, {"SumColumn"})
in
ExpandedTable
COUNTIF:
let
GroupedTable = Table.Group(YourTableName, {"C"}, {{"CountColumn", each Table.RowCount(_), Int64.Type}}),
MergedTable = Table.NestedJoin(YourTableName, {"C"}, GroupedTable, {"C"}, "MergedColumn", JoinKind.LeftOuter),
ExpandedTable = Table.ExpandTableColumn(MergedTable, "MergedColumn", {"CountColumn"}, {"CountColumn"})
in
ExpandedTable
COUNTIF MR8M:
= Table.AddColumn(YourTableName, "CountMR8M", each if [D] = "MR8M" then 1 else 0)
sum count
let
SummedTable = Table.Group(YourTableName, {}, {{"TotalMR8M", each List.Sum([CountMR8M]), type number}})
in
SummedTable
:in power query create custom column:
= Table.AddColumn(YourTableName, "Condition1", each if [D] = 3 and [E] > 1 then "True" else "False")
create custom column
= Table.AddColumn(YourTableName, "Condition2", each if Number.Mod([B], 2) = 0 and [F] = 0 and [G] = 0 then "True" else "False")
Did I answer your question? If so, please mark my post as the solution!
Your Kudos are much appreciated! Proud to be a Resolver III !
re: "Countif MR8M text in the column Text"
How do you determine MR8M ? I don't see it anywhere among the data.
Thanks for your prompt reply
This is my raw data
Scripts | Source | Vendor | VendorName | CompanyCode | FiscalYear | DocumentType | DocumentDate | PostingKey | PostingDate | DocumentNumber | Reference | Amountindoccurr | Documentcurrency | Amountinlocalcurrency | LocalCurrency | Clearingdate | Text | Netduedate | Value | CC | |
S(0-25)-1 | SAP | 2003178780 | US29 | 2024 | RE | 28-02-2023 | 31 | 01-08-2024 | 5101197126 | 199065 | -10.7 | USD | -10.7 | USD | VR:Pay-as-billed | 4/29/2023 | Below 10K | 51011971262024US29 | 19906510.7 | ||
S(0-25)-1 | SAP | 2003215158 | US29 | 2023 | RE | 28-02-2023 | 31 | 25-03-2023 | 5100017080 | 199065 | -10.7 | USD | -10.7 | USD | VR:Pay-as-billed | 4/29/2023 | Below 10K | 51000170802023US29 | 19906510.7 | ||
S(0-25)-1 | SAP | 2003155708 | US28 | 2024 | RE | 11-07-2024 | 21 | 31-07-2024 | 5101413528 | NY15-00064666 | 12.9 | USD | 12.9 | USD | MR8M | 11/8/2024 | Below 10K | 51014135282024US28 | NY15-0006466612.9 | ||
S(0-25)-1 | SAP | 2003155708 | US28 | 2024 | RE | 11-07-2024 | 31 | 20-07-2024 | 5101491591 | NY15-00064666 | -12.9 | USD | -12.9 | USD | 11/8/2024 | Below 10K | 51014915912024US28 | NY15-0006466612.9 | |||
S(0-25)-1 | SAP | 2000022228 | US28 | 2024 | RE | 21-05-2024 | 31 | 23-07-2024 | 5101566015 | 9125964099 | -15.28 | USD | -15.28 | USD | VR:Pay-as-billed | 9/18/2024 | Below 10K | 51015660152024US28 | 912596409915.28 | ||
S(0-25)-1 | SAP | 2000022228 | US28 | 2024 | RE | 21-05-2024 | 21 | 23-07-2024 | 5101567516 | 9125964099 | 15.28 | USD | 15.28 | USD | VR:Pay-as-billed | 9/18/2024 | Below 10K | 51015675162024US28 | 912596409915.28 | ||
S(0-25)-1 | SAP | 2000022228 | US28 | 2024 | RE | 21-05-2024 | 21 | 31-07-2024 | 5101752521 | 9125964099 | 15.28 | USD | 15.28 | USD | VR:Pay-as-billed | 9/18/2024 | Below 10K | 51017525212024US28 | 912596409915.28 | ||
S(0-25)-1 | SAP | 2000022228 | US28 | 2024 | RE | 21-05-2024 | 31 | 05-06-2024 | 5101874011 | 9125964099 | -15.28 | USD | -15.28 | USD | VR:Pay-as-billed | 9/18/2024 | Below 10K | 51018740112024US28 | 912596409915.28 | ||
S(0-25)-1 | SAP | 2004365991 | VESTIS GROUP INC | US29 | 2024 | RE | 17-07-2024 | 31 | 01-08-2024 | 5101149040 | 4130245299 | -20.47 | USD | -20.47 | USD | VR:Full Accrual | 9/15/2024 | Below 10K | 51011490402024US29 | 413024529920.47 | |
S(0-25)-1 | SAP | 2004365991 | VESTIS GROUP INC | US29 | 2024 | RE | 17-07-2024 | 21 | 01-08-2024 | 5101984655 | 4130245299 | 20.47 | USD | 20.47 | USD | VR:Full Accrual | 9/15/2024 | Below 10K | 51019846552024US29 | 413024529920.47 | |
S(0-25)-1 | SAP | 2003155708 | US28 | 2024 | RE | 05-07-2024 | 21 | 31-07-2024 | 5101413527 | NY15-00064588 | 20.5 | USD | 20.5 | USD | VR:Full Accrual | 11/2/2024 | Below 10K | 51014135272024US28 | NY15-0006458820.5 | ||
S(0-25)-1 | SAP | 2003155708 | US28 | 2024 | RE | 05-07-2024 | 31 | 11-07-2024 | 5101575516 | NY15-00064588 | -20.5 | USD | -20.5 | USD | VR:Full Accrual | 11/2/2024 | Below 10K | 51015755162024US28 | NY15-0006458820.5 | ||
S(25-60)-1 | SAP | 110076660 | SUPPLYFORCE | 1000 | 2024 | RE | 03-12-2020 | 31 | 01-08-2024 | 5135751891 | S111229788001 | -149.48 | USD | -149.48 | USD | TICKET SCTASK7507362 | 2/1/2021 | Below 10K | 513575189120241000 | S111229788001149.48 | |
S(25-60)-1 | SAP | 110077236 | KIRBY RISK ELECTRICAL SUPPLY | 1000 | 2024 | ZC | 03-12-2020 | 21 | 01-08-2024 | 5135751741 | S111229788001 | 149.48 | USD | 149.48 | USD | MR8M | 2/1/2021 | Below 10K | 513575174120241000 | S111229788001149.48 | |
S(25-60)-1 | SAP | 110013648 | INGERSOLL RAND CO | 1000 | 2023 | RE | 11-07-2023 | 31 | 17-07-2023 | 5132476310 | 31071227 | -311.61 | USD | -311.61 | USD | 9/9/2023 | Below 10K | 513247631020231000 | 31071227311.61 | ||
S(25-60)-1 | SAP | 110013648 | INGERSOLL RAND CO | 1000 | 2024 | RE | 11-07-2023 | 31 | 31-07-2024 | 5135737969 | 31071227 | -311.61 | USD | -311.61 | USD | TICKET SCTASK7538918 | 9/9/2023 | Below 10K | 513573796920241000 | 31071227311.61 | |
S(25-60)-1 | SAP | 10037358 | GRAINGER INC | 1000 | 2024 | RE | 23-10-2023 | 21 | 31-07-2024 | 5135738340 | 9880021804 | 82.24 | USD | 82.24 | USD | 7/31/2024 | SCTASK7541285 | 10/23/2023 | Below 10K | 513573834020241000 | 988002180482.24 |
S(25-60)-1 | SAP | 110089815 | GRAINGER INC CR | 1000 | 2024 | RE | 23-10-2023 | 21 | 09-07-2024 | 5135513389 | 9880021804 | 82.24 | USD | 82.24 | USD | 10/23/2023 | Below 10K | 513551338920241000 | 988002180482.24 | ||
S(25-60)-1 | SAP | 2003155708 | US28 | 2024 | RE | 16-11-2023 | 21 | 31-07-2024 | 5100822034 | NY15-00059334 | 281.2 | USD | 281.2 | USD | MR8M | 3/15/2024 | Below 10K | 51008220342024US28 | NY15-00059334281.2 | ||
S(25-60)-1 | SAP | 2003155708 | US28 | 2024 | RE | 16-11-2023 | 31 | 10-07-2024 | 5101126254 | NY15-00059334 | -281.2 | USD | -281.2 | USD | 3/15/2024 | Below 10K | 51011262542024US28 | NY15-00059334281.2 | |||
S(25-60)-1 | SAP | 2003155708 | US28 | 2024 | RE | 16-11-2023 | 21 | 01-07-2024 | 5101239148 | NY15-00059334 | 281.2 | USD | 281.2 | USD | VR:Full Accrual | 3/15/2024 | Below 10K | 51012391482024US28 | NY15-00059334281.2 | ||
S(25-60)-1 | SAP | 2003155708 | US28 | 2024 | RE | 16-11-2023 | 31 | 02-05-2024 | 5101580014 | NY15-00059334 | -281.2 | USD | -281.2 | USD | VR:Full Accrual | 3/15/2024 | Below 10K | 51015800142024US28 | NY15-00059334281.2 | ||
S(25-60)-1 | SAP | 10037358 | GRAINGER INC | 1000 | 2023 | RE | 05-12-2023 | 31 | 22-12-2023 | 5133914906 | 9923837950 | -382.63 | USD | -382.63 | USD | Dept#C-PAY | 1/9/2024 | Below 10K | 513391490620231000 | 9923837950382.63 | |
S(25-60)-1 | SAP | 10072931 | GRAINGER INC | 1000 | 2024 | RE | 05-12-2023 | 31 | 01-08-2024 | 5135751575 | 9923837950 | -382.63 | USD | -382.63 | USD | 1/9/2024 | Below 10K | 513575157520241000 | 9923837950382.63 | ||
S(25-60)-1 | SAP | 10037358 | GRAINGER INC | 1000 | 2023 | RE | 11-12-2023 | 31 | 27-12-2023 | 5133931734 | 9930189072 | -127.54 | USD | -127.54 | USD | 1/15/2024 | Below 10K | 513393173420231000 | 9930189072127.54 | ||
S(25-60)-1 | SAP | 10072931 | GRAINGER INC | 1000 | 2024 | RE | 11-12-2023 | 31 | 31-07-2024 | 5135737845 | 9930189072 | -127.54 | USD | -127.54 | USD | 1/15/2024 | Below 10K | 513573784520241000 | 9930189072127.54 | ||
S(25-60)-1 | SAP | 10031849 | IOWA FLUID POWER | 1000 | 2024 | RE | 20-12-2023 | 31 | 30-07-2024 | 5135726814 | 1706974 | -223.24 | USD | -223.24 | USD | 2/18/2024 | Below 10K | 513572681420241000 | 1706974223.24 | ||
S(25-60)-1 | SAP | 10033192 | IOWA FLUID POWER | 1000 | 2024 | RE | 20-12-2023 | 31 | 31-07-2024 | 5135726814 | 1706974 | -223.24 | USD | -223.24 | USD | 2/18/2024 | Below 10K | 513572681420241000 | 1706974223.24 | ||
S(25-60)-1 | SAP | 2000018636 | US28 | 2024 | RE | 02-02-2024 | 21 | 01-08-2024 | 5100826506 | 2376117 | 343.2 | USD | 343.2 | USD | VR:Pay-as-billed | 4/2/2024 | Below 10K | 51008265062024US28 | 2376117343.2 | ||
S(25-60)-1 | SAP | 2000018636 | US28 | 2024 | RE | 02-02-2024 | 31 | 19-02-2024 | 5100961501 | 2376117 | -343.2 | USD | -343.2 | USD | VR:Pay-as-billed | 4/2/2024 | Below 10K | 51009615012024US28 | 2376117343.2 | ||
S(25-60)-1 | SAP | 110080769 | SAP AMERICA INC | 1000 | 2024 | RE | 13-02-2024 | 31 | 01-08-2024 | 5134521776 | 10750240000220 | -198.33 | USD | -198.33 | USD | SCTASK7547652 | 4/13/2024 | Below 10K | 513452177620241000 | 10750240000220198.33 | |
S(25-60)-1 | SAP | 110081079 | SUCCESSFACTORS INC | 1000 | 2024 | RE | 13-02-2024 | 31 | 06-03-2024 | 5134521776 | 10750240000220 | -198.33 | USD | -198.33 | USD | Below 10K | 513452177620241000 | 10750240000220198.33 | |||
S(25-60)-1 | SAP | 110088296 | CINTAS FIRE NATIONAL ACCOUNTS | 1000 | 2024 | RE | 23-02-2024 | 31 | 13-06-2024 | 5135336621 | I402230584 | -154 | USD | -154 | USD | 4/23/2024 | Below 10K | 513533662120241000 | I402230584154 | ||
S(25-60)-1 | SAP | 110088296 | CINTAS FIRE NATIONAL ACCOUNTS | 1000 | 2024 | RE | 23-02-2024 | 31 | 31-07-2024 | 5135738154 | I402230584 | -154 | USD | -154 | USD | 4/23/2024 | Below 10K | 513573815420241000 | I402230584154 | ||
S(25-60)-1 | SAP | 2003183692 | US29 | 2024 | RE | 08-03-2024 | 31 | 10-05-2024 | 5100937885 | I403081025 | -437.34 | USD | -437.34 | USD | VR:Pay-as-billed | 5/7/2024 | Below 10K | 51009378852024US29 | I403081025437.34 | ||
S(25-60)-1 | SAP | 2003183692 | US29 | 2024 | RE | 08-03-2024 | 21 | 11-07-2024 | 5101564525 | I403081025 | 437.34 | USD | 437.34 | USD | VR:Pay-as-billed | 5/7/2024 | Below 10K | 51015645252024US29 | I403081025437.34 | ||
S(25-60)-1 | SAP | 2004015811 | US29 | 2024 | RE | 08-03-2024 | 31 | 01-08-2024 | 5101111176 | I403081025 | -437.34 | USD | -437.34 | USD | VR:Pay-as-billed | 5/7/2024 | Below 10K | 51011111762024US29 | I403081025437.34 | ||
S(25-60)-1 | SAP | 2000022228 | US28 | 2024 | RE | 01-05-2024 | 31 | 10-05-2024 | 5100965506 | 9104797676 | -83.41 | USD | -83.41 | USD | 8/29/2024 | Below 10K | 51009655062024US28 | 910479767683.41 | |||
S(25-60)-1 | SAP | 2000022228 | US28 | 2024 | RE | 01-05-2024 | 21 | 31-07-2024 | 5101205008 | 9104797676 | 83.41 | USD | 83.41 | USD | MR8M | 8/29/2024 | Below 10K | 51012050082024US28 | 910479767683.41 |
I've made a start in the linked-to workbook below using the data in your last reply.
There's a Power Query query table at cell AI3.
Curious that some date columns are UK-style dates and others US-style dates!
Your data has been grouped by the first 2 columns. There's only F-44 Clearing in the Comment column because no other comment applies in your data.
The workbook: https://app.box.com/s/qv411rzbbntw4bt9be6h81x7ihgyk1hr
Thanks for kind help
Can you please give me M code for the same
It's in the linked-to workbook at the end of my last message.
Hello - can you please provide an example of the expected result so we can better understand what you are trying to accomplish? The description provided is a bit confusing. Thanks!
Thanks for prompt reply
This is input data
Reference | Amountindoccurr |
199065 | -10.7 |
199065 | -10.7 |
NY15-00064666 | 12.9 |
NY15-00064666 | -12.9 |
9125964099 | -15.28 |
9125964099 | 15.28 |
9125964099 | 15.28 |
9125964099 | -15.28 |
4130245299 | -20.47 |
4130245299 | 20.47 |
NY15-00064588 | 20.5 |
NY15-00064588 | -20.5 |
S111229788001 | -149.48 |
S111229788001 | 149.48 |
31071227 | -311.61 |
31071227 | -311.61 |
9880021804 | 82.24 |
9880021804 | 82.24 |
NY15-00059334 | 281.2 |
NY15-00059334 | -281.2 |
NY15-00059334 | 281.2 |
NY15-00059334 | -281.2 |
9923837950 | -382.63 |
9923837950 | -382.63 |
9930189072 | -127.54 |
9930189072 | -127.54 |
1706974 | -223.24 |
1706974 | -223.24 |
2376117 | 343.2 |
2376117 | -343.2 |
10750240000220 | -198.33 |
10750240000220 | -198.33 |
I402230584 | -154 |
I402230584 | -154 |
I403081025 | -437.34 |
I403081025 | 437.34 |
I403081025 | -437.34 |
9104797676 | -83.41 |
9104797676 | 83.41 |
INV-82351728083 | -109.88 |
INV-82351728083 | 109.88 |
198141192 | -102.84 |
198141192 | 102.84 |
198141192 | 102.84 |
198141192 | -102.84 |
198141192 | -102.84 |
198141192 | 102.84 |
AR2108052 | -159.38 |
AR2108052 | 159.38 |
187202684 | 95 |
187202684 | -95 |
187202685 | 95 |
187202685 | -95 |
187203048 | -100 |
187203048 | 100 |
187203046 | 205 |
187203046 | -205 |
03S7548890 | -321.5 |
03S7548890 | -321.5 |
187203047 | 80 |
187203047 | -80 |
NY15-00064557 | 71.2 |
NY15-00064557 | -71.2 |
187203367 | -243.62 |
187203367 | 243.62 |
NY15-00064594 | 53.62 |
NY15-00064594 | -53.62 |
NY15-00064584 | -262.64 |
NY15-00064584 | 262.64 |
NY15-00064674 | 65.5 |
NY15-00064674 | -65.5 |
4198862563 | -248.2 |
4198862563 | 248.2 |
4198862563 | -248.2 |
SI-18621 | -293.73 |
SI-18621 | -293.73 |
SI-18621 | 293.73 |
198143236 | -102.84 |
198143236 | 102.84 |
198143236 | -102.84 |
198143236 | 102.84 |
198143239 | 102.84 |
198143239 | -102.84 |
198143239 | -102.84 |
198143239 | 102.84 |
NY15-00064825 | 109.3 |
NY15-00064825 | -109.3 |
SVC606275 | -164.82 |
SVC606275 | -164.82 |
SVC606274 | -206.03 |
SVC606274 | -206.03 |
198144085 | 56.02 |
198144085 | -56.02 |
198144085 | 56.02 |
198144085 | -56.02 |
198144086 | 56.03 |
198144086 | -56.03 |
198144086 | -56.03 |
198144086 | 56.03 |
198144079 | -112.04 |
198144079 | -112.04 |
198144079 | 112.04 |
198144079 | 112.04 |
198144080 | -280.09 |
198144080 | -280.09 |
198144080 | 280.09 |
198144080 | 280.09 |
198144087 | -280.11 |
198144087 | 280.11 |
198144087 | -280.11 |
198144087 | 280.11 |
198144078 | 480.62 |
198144078 | -480.62 |
198144078 | 480.62 |
198144078 | -480.62 |
5019015752 | -124.07 |
5019015752 | -124.07 |
AR2113693 | 159.38 |
AR2113693 | -159.38 |
H1032801 | 247.8 |
H1032801 | -247.8 |
H1013701 | 294.12 |
H1013701 | -294.12 |
H0994001 | 397.08 |
H0994001 | -397.08 |
147455353 | 101.65 |
147455353 | -101.65 |
147455492 | 101.65 |
147455492 | -101.65 |
147455493 | 101.65 |
187203046 | 205 |
Output should be
Reference | Amountindoccurr | Concatenate | Sum | CountIF | MR8M | Comments |
000000079314 | -22000 | 00000007931422000 | -22000 | 3 | 1 | Less priority |
000000079314 | 22000 | 00000007931422000 | -22000 | 3 | 1 | Less priority |
000000079314 | -22000 | 00000007931422000 | -22000 | 3 | 1 | Less priority |
000000080007CO | -7500 | 000000080007CO7500 | -7500 | 1 | 0 | |
0000009 | -1500 | 00000091500 | -1500 | 1 | 0 | |
0000035 | -750 | 0000035750 | -750 | 1 | 0 |
Hey @KuntalSingh, try this and let me know if you encounter any issues.
In a new sheet:
=A2 & ABS(B2)
=SUMIF($C$2:$C$100, C2, $B$2:$B$100)
=COUNTIF($C$2:$C$100, C2)
=COUNTIF(D:D, "MR8M")
Home-> Conditional Formatting -> New Rule:
=AND($D2=3, $E2>1)
Home-> Conditional Formatting -> New Rule:
=AND(MOD($B2, 2)=0, $F2=0, $G2=0)
Thanks for relpy
I am able to do it in excel but need same in power query Need M code.
@KuntalSingh, go ahead and try it, and if you hit any snags, just reach out.
in power query, create a new column
= Table.AddColumn(YourTableName, "ConcatenatedColumn", each [A] & Number.ToText(Number.Abs([B])))
SUMIF:
let
GroupedTable = Table.Group(YourTableName, {"C"}, {{"SumColumn", each List.Sum([B]), type number}}),
MergedTable = Table.NestedJoin(YourTableName, {"C"}, GroupedTable, {"C"}, "MergedColumn", JoinKind.LeftOuter),
ExpandedTable = Table.ExpandTableColumn(MergedTable, "MergedColumn", {"SumColumn"}, {"SumColumn"})
in
ExpandedTable
COUNTIF:
let
GroupedTable = Table.Group(YourTableName, {"C"}, {{"CountColumn", each Table.RowCount(_), Int64.Type}}),
MergedTable = Table.NestedJoin(YourTableName, {"C"}, GroupedTable, {"C"}, "MergedColumn", JoinKind.LeftOuter),
ExpandedTable = Table.ExpandTableColumn(MergedTable, "MergedColumn", {"CountColumn"}, {"CountColumn"})
in
ExpandedTable
COUNTIF MR8M:
= Table.AddColumn(YourTableName, "CountMR8M", each if [D] = "MR8M" then 1 else 0)
sum count
let
SummedTable = Table.Group(YourTableName, {}, {{"TotalMR8M", each List.Sum([CountMR8M]), type number}})
in
SummedTable
:in power query create custom column:
= Table.AddColumn(YourTableName, "Condition1", each if [D] = 3 and [E] > 1 then "True" else "False")
create custom column
= Table.AddColumn(YourTableName, "Condition2", each if Number.Mod([B], 2) = 0 and [F] = 0 and [G] = 0 then "True" else "False")
Did I answer your question? If so, please mark my post as the solution!
Your Kudos are much appreciated! Proud to be a Resolver III !
Thank you very much for yor kind support!