0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

〇PowerAppsでGrupBy して表結合して合計する方法

Last updated at Posted at 2022-09-06

表結合を行うには
image.png

以下のようにすればよい
image.png

/// table_2をcollection_of_table_2に挿入
ClearCollect(collection_of_table_2,ForAll(table_2,{id:ThisRecord.id,product:ThisRecord.product,price:ThisRecord.price}));
//idごとにGrupBy
ClearCollect(collection_of_table_2_groupby,GroupBy(collection_of_table_2,"id","product"));
//productごとにこう合計
ClearCollect( collection_of_table_2_groupby_sum, AddColumns(collection_of_table_2_groupby, "Sum of price", Sum(product,price)));
// table_1と結合
ClearCollect(
    collection_of_table_join,
    AddColumns(
        collection_of_table_2_groupby_sum,
        "group",LookUp(table_1,id=collection_of_table_2_groupby_sum[@id],group)
    )
);
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?