topic Calculate total of calculated SP List column in Building Flows
https://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453813#M54107
<P>Hi All</P><P>I am creating a flow where I am selecting few items from SharePoint list and then I need to calculate total of calculated column of those selected items, so before "Apply to each" I make a temp number variable and in "Apply to each" I try to increment it but calculated field doesnt appear in Dynamic Content (because flow sees calculated field as a string). I cannot convert that calculated field value to number because in doesnt appear in Dynamic Content when I try to set it as parameter for expressions int() or float().</P><P>So how do I calculate that total (or use calculated field from SP List at all)?</P><P>Please do not write "It works for me" - that doesnt help.</P><P>Thanks </P>Mon, 27 Jan 2020 09:40:58 GMTRomanKorchak2020-01-27T09:40:58ZCalculate total of calculated SP List column
https://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453813#M54107
<P>Hi All</P><P>I am creating a flow where I am selecting few items from SharePoint list and then I need to calculate total of calculated column of those selected items, so before "Apply to each" I make a temp number variable and in "Apply to each" I try to increment it but calculated field doesnt appear in Dynamic Content (because flow sees calculated field as a string). I cannot convert that calculated field value to number because in doesnt appear in Dynamic Content when I try to set it as parameter for expressions int() or float().</P><P>So how do I calculate that total (or use calculated field from SP List at all)?</P><P>Please do not write "It works for me" - that doesnt help.</P><P>Thanks </P>Mon, 27 Jan 2020 09:40:58 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453813#M54107RomanKorchak2020-01-27T09:40:58ZRe: Calculate total of calculated SP List column
https://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453825#M54108
<P><LI-USER uid="60545"></LI-USER> </P>
<P>From my experience, flow and calculated SP List columns were not good friends.</P>
<P>It's a long time I do not check if calculated SP List Columns and Flow are already compatible,so also very interested to see if somebody has a way to solve this.</P>
<P>What I do is to apply a different approach: instead of using Calculated columns, I make Flow to be the one that do this calculation job instead, please note you need to be careful to make sure Flow calculation does not create a neverending loop because Flow shall be evaluated everytime the item changes. There were some workarounds to make this work, but last year a very useful functionality was released: trigger execution dependant on a condition, as explained <A href="https://powerusers.microsoft.com/t5/General-Power-Automate/Trigger-conditions-for-Flow-now-available/td-p/334463" target="_self">here</A>. </P>
<P> </P>
<P>Not sure if this approach matches your requirements although</P>
<P> </P>Mon, 27 Jan 2020 09:55:22 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453825#M54108efialttes2020-01-27T09:55:22ZRe: Calculate total of calculated SP List column
https://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453846#M54109
<P>thanks <LI-USER uid="15146"></LI-USER> , I have thought of that <BR />But the problem is that even number columns not appearing under Dynamic content in parameters of mul() , float() or int() .</P><P> </P>Mon, 27 Jan 2020 10:04:59 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453846#M54109RomanKorchak2020-01-27T10:04:59ZRe: Calculate total of calculated SP List column
https://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453870#M54111
<P><LI-USER uid="60545"></LI-USER> </P>
<P>You should be able to use SP Number columns in PowerAutomate (aka Flow) expressions. The point is: flow editor sometimes is a bit buggy <span class="lia-unicode-emoji" title=":disappointed_face:">ðŸ˜ž</span></P>
<P>You can try the following approach: add the Number column itself, hover the mouse over it, and you will see the alias given by flow to invoke it. Then write you own expression with the editor, and add the Number column alias given by Flow.</P>
<P>Hope this helps</P>Mon, 27 Jan 2020 10:19:51 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453870#M54111efialttes2020-01-27T10:19:51ZRe: Calculate total of calculated SP List column
https://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453960#M54121
<P><LI-USER uid="15146"></LI-USER> </P><P>Tried that - getting "The expression is invalid" <span class="lia-unicode-emoji" title=":disappointed_face:">ðŸ˜ž</span> </P>Mon, 27 Jan 2020 11:42:39 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453960#M54121RomanKorchak2020-01-27T11:42:39ZRe: Calculate total of calculated SP List column
https://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453991#M54126
<P>Hi again</P>
<P>Can you share the expression you are trying?</P>
<P>Hope this helps</P>Mon, 27 Jan 2020 12:09:02 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/453991#M54126efialttes2020-01-27T12:09:02ZRe: Calculate total of calculated SP List column
https://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/454078#M54137
<DIV class="mceNonEditable lia-copypaste-placeholder"> </DIV><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 832px;"><img src="https://powerusers.microsoft.com/t5/image/serverpage/image-id/113226i8BB93EEA5648D7B4/image-size/large?v=v2&px=999" role="button" title="image.png" alt="image.png" /></span></P><P> </P><P>mul("@items('Apply_to_each_Capx_Item')?['Price']",2)</P><P> </P>Mon, 27 Jan 2020 13:53:05 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/454078#M54137RomanKorchak2020-01-27T13:53:05ZRe: Calculate total of calculated SP List column
https://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/454125#M54144
<P> Hi again</P>
<P>Try with</P>
<P>mul(items('Apply_to_each_Capx_Item')?['Price'],2)</P>
<P>Hope this helps</P>Mon, 27 Jan 2020 14:30:27 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/454125#M54144efialttes2020-01-27T14:30:27ZRe: Calculate total of calculated SP List column
https://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/454810#M54215
<P> </P>
<P>Hi <LI-USER uid="60545"></LI-USER> ,</P>
<P> </P>
<P>You can use Compose to store the dynamic content you need to obtain, and then configure the output of Compose in expression.</P>
<P>Like:</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="73.PNG" style="width: 907px;"><img src="https://powerusers.microsoft.com/t5/image/serverpage/image-id/113442iD040DB9E6F4B52B8/image-size/large?v=v2&px=999" role="button" title="73.PNG" alt="73.PNG" /></span></P>
<P> </P>
<P>Best Regards,</P>Tue, 28 Jan 2020 07:54:07 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Calculate-total-of-calculated-SP-List-column/m-p/454810#M54215v-bacao-msft2020-01-28T07:54:07Z