在 Power App 中可编辑的透视表样式矩阵

huangapple go评论57阅读模式
英文:

Editable pivot-table style matrix in Power App

问题

我有一个数据集,可以存储在SharePoint列表或Dataverse中。数据包含以下字段:

  1. 类别A
  2. 类别B
  3. 类别X
  4. 类别Y

我想在一个二维表格中显示这些数据,其中每一行都是CatA和CatB的唯一组合,每一列都是CatX和CatY的唯一组合。每个交叉点(单元格)表示是或否(布尔值)。
最初,数据表或列表将为空。打开应用程序时,用户将会看到一些带有一些CatA/CatB组合的行,并有选项插入一个新的列,其中包含他们选择的CatX/CatY组合(通过一对下拉控件)。然后,他们可以在矩阵的每个单元格中指定是/否(通过复选框、切换或类似方式)。用户可以添加任意数量的列,每列都具有唯一的CatX/CatY组合。但实际上,预计他们永远不会超过10列。

我现在正处于探索Power Apps并研究提供的选项阶段。我正在调查画布应用程序和数据驱动应用程序哪个更适合。我也在研究哪些控件最适用以及如何设计它们。

我能看到画布应用程序的一个选项是使用一个看起来像带有10列的表格的画廊,并隐藏未使用的列。对于每列,画廊显示一个复选框。然而,我想到画廊控件很好地绑定于一维数据表,但与二维表格不是原生绑定,因此在后台可能需要大量的连线工作。

然后,我研究了嵌入PowerBI可视化的选项,但对PowerBi不是很熟悉(我对数据透视表和Power Pivot很熟悉)。似乎Power BI可以生成一个仪表板,显示所需的矩阵数据(透视表样式),但我不清楚该表是否可编辑?也就是说,当用户在一个单元格中输入是时,会创建一个具有相应CatA/CatB/CatX/CatY值的条目。

我想知道哪个解决方案需要较少的连线工作,并欢迎任何可能我忽略的替代建议或考虑,以便我可以更好地评估应该采取哪个方向。

英文:

I have a data set, which could be stored either as a SharePoint list or in Dataverse.
The data contains the following fields:

  1. Category A
  2. Category B
  3. Category X
  4. Category Y

I would like to show this data in a 2D table, where each row is a unique combination of CatA and Cat B, and each column is a unique combination of CatX and CatY. Each intersection (cell) indicates Yes or No (a boolean).
Initially, the data table or list will be empty. When opening the App, the user will be given a few rows with some CatA/CatB combinations, and have the option to insert a new column with the CatX/CatY combination of their choice (via a pair of dropdown controls). They can then specify Yes/No in each cell of the matrix (via checkbox, toggle, or similar). The user can add as many columns as they whish, each with a unique combination of CatX/CatY. In practice though, it is expected they will never exceed 10 columns.

I am at the stage of discovering Power Apps and exploring the options offered.
I am investigating wether a Canvas App or a Data-Driven App would fit better. I am also investigating which controls would work best and how to design them.

One option I can see for a Canvas App is to use a Gallery that will look like a table with 10 columns, and hide the columns not in use. For each column, the gallery shows a checkbox. I have however thought that the gallery control binds well with 1-dimensional data tables, but not natively with 2-dimensional tables, so a lot of wiring would be required in the background.

I have then investigated the option of embedding a PowerBI Visualization, but am not very familiar with PowerBi (I am with Pivot tables and Power Pivot too). It seems that Power BI would allow to generate a dashboard which would show a matrix showing the data as wanted (pivot-table style), but it is not clear to me if that table would be editable? That is, when the user puts yes in one cell, then an entry is created with the corresponding CatA/CatB/CatX/CatY values.

I would like to know what solution would require less wiring work, and welcome any alternative suggestion or consideration I may have missed so that I can better assess which direction to take.

答案1

得分: 1

我理解,创建一个在Power BI仪表板中的磁贴并嵌入到画布应用程序中并不能实现你的目标。这不会使你能够创建记录/列。

嵌套的画廊可以帮助你显示和编辑数据。通过下拉菜单添加新列仍然是一个挑战。也许可以创建一个复杂的逻辑将你的表格转换成一个矩阵,但在我看来,这并不是画布应用程序的一个非常合适的场景。

英文:

As I understand, creating a tile in a Power BI dashboard and embedding it in the canvas app does not achieve your goal. It will not enable you to create records/columns.

Nested galleries can help you display and edit data. Adding new columns via dropdowns is still a challenge. Perhaps an intricate logic of transforming your table into a matrix can be created, but this is not a very suitable scenario for canvas apps in my opinion.

huangapple
  • 本文由 发表于 2023年2月19日 02:53:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/75495651.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定