Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

Formula to summarise the information from another table in a text

Hi,

I am looking for a formula to summarise the information from another table in a text.

Here is an example of what I am looking for :

————————
Purchases table
————————

ProductQuantity
Product_110
Product_2 10
Product_1 20
Product_3 10
Product_2 20

————————
Purchase_Summarize table
————————

Purchase_IDPurchase_Text
123423 “Hello, I would like to order : <br /> Product_1 30pc<br /> Product_2 30pc <br /> Product_3 10pc”

————————

I try to write a Formula for “Purchase_text” (being a sumup without duplicates)

Thank you in advance for all the help you can give me. 🙂

Solved Solved
0 10 552
1 ACCEPTED SOLUTION

Okay, I will mention a simpler to implement but sync time expensive way. You could achieve the same with implementing reference actions as well that will not be sync time expensive.

Please add a column called say [Total_Product_Quantity] in the Purchases table with an expression something like 

SUM(SELECT(Purchases[Quantity],AND([Purchase_Id]=[_THISROW].[Purrchase_ID], [Product]=[_THISROW].[Product])))

Please note that expressions such as above can take a lot of app sync time as the table size increases. You can of course have some configurations such as using security filters, slices to reduce the sync time but that is a larger subject.

Now please revise the expression for the [Product_Quantity] column as 

CONCATENATE([Product], "-", [Total_Product_Quantity])

Please revise the expression for the [Purchase_text] column as 

SUBSTITUTE(UNIQUE(LIST("Hi I would like to order: ")+[Related Purchases][Product_Quantity]), ",", "
")

 

 

View solution in original post

10 REPLIES 10
Top Labels in this Space