Forum Discussion
SUMMARIZE error The expression refers to multiple columns... cannot be converted to a scalar value
- 10 years ago
You seem to have 2 commas, I have highlighted and underlined that part.
calculate(sum(ChargeActivity[Invoice Price])), , "CostpRow", calculate(sum(MTpAcct[Cost/Row])))
Just change that to one comma :)... The error is basically saying that yo have specified one extra arguement or one less, because of the redundant comma.
And you can create a new table also if you want in Power BI. Go to the modelling section of PBI, and you can see Data Tools->Modelling->New Table. You can write the expression below to create the table
TableName=summarize(Table, Table[AccountID], Table[Date], "InvPrice", calculate(sum(Table[InvoicePrice])))
This should give you the new table which has the sum of invoice proce by Account and Date
Thanks for this again SqlJason
The ability ot create a new table from an expression has unlocked a lot of possiblities. Long term I want to understand enough to do whatever I want but short term for this thread we are nearly there, using the new New table
A NewTable = summarize(ChargeActivity, ChargeActivity[Acct2Use], ChargeActivity[Date],ChargeActivity[Account Name], "Invoice Price", calculate(sum(ChargeActivity[Invoice Price])), , "CostpRow", calculate(sum(MTpAcct[Cost/Row])))
or VERY similar was working great but I wanted to add aother column for Account Id (having changed ot using Acct2Use.. long story) .. I wanted this as a reference information only without grouping by it so I tried to put it in as another argument like ..."CostpRow", calculate(sum(MTpAcct[Cost/Row]))... ..but without summing it. This did not work and now in going back to what did work I get the error..Argument "7" in SUMMARIZE function is required... Can you see what in the above would cause that?
If you can sort this I'll accept this as a response and re-post the next question!
-
- It does not seem to
- SqlJason10 years agoMemorable Member
You seem to have 2 commas, I have highlighted and underlined that part.
calculate(sum(ChargeActivity[Invoice Price])), , "CostpRow", calculate(sum(MTpAcct[Cost/Row])))
Just change that to one comma :)... The error is basically saying that yo have specified one extra arguement or one less, because of the redundant comma.
- Tim10 years agoRegular Visitor
embarrassing!.. I'll be back I'm sure. many thanks
- Anonymous6 years agoNot applicable
=SUMMARIZE(Table3,Table3[Group],"HC COMMIT LM",CALCULATE(AVERAGE(Table3[HC CAMPAIGN LM])))
Hi all, Please help to look out my sentence as above and give me advice for correcting it.