在建立关系的同时避免歧义 [英] Creating Relationships while avoiding ambiguities

查看:107
本文介绍了在建立关系的同时避免歧义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个像这样的桌子,

I have a flat table like this,

R#  Cat SWN CWN CompBy  ReqBy   Department
1   A   1   1   Team A  Team B  Department 1
2   A   1   3   Team A  Team B  Department 1
3   B   1   3   Team A  Team B  Department 1
4   B   2   3   Team A  Team C  Department 1
5   B   2   3   Team D  Team C  Department 2
6   C   2   2   Team D  Team C  Department 2

R#表示请求编号,
目录号表示类别,
SWN表示已提交的星期编号,
CWN表示已完成的星期编号,
CompBy表示完成者,
要求表示,请求者,
部门表示部门名称,

R# indicates the RequestNumber, Cat# indicates the Category, SWN indicates the Submitted Week Number, CWN indicates the Completed Week Number, CompBy indicates Completed By, ReqBy Indicates Requested By, Department Indicates Department Name,

我想创建一个避免模棱两可的数据模型,同时,我可以通过一个过滤器报告类别,SWN,CWN(只需一个星期的数字),CompBY,ReqBy和Department。

I would like to create a data model that avoids ambiguity and at the same time allows me to report on Category, SWN, CWN (needs to be only a week number), CompBY, ReqBy, Department through a single filter.

例如,仪表板将具有单个fi选择一个星期号。如果选择了那个星期号,它将显示已提交和已完成的星期号中这些请求的详细信息。我知道这需要创建日历表或类似的表。

For example, the dashboard will have a single filter choice to select a week number.If that week number is selected, it will show the details of these requests from submitted and completed week number. I understand this requires the creation of a calendar table or something like that.

我正在寻找一个解释基数和方向(单个或两个)的数据模型。如果可能的话,请张贴PBIX文件并在此处重新发布链接。

I am looking for a data-model that explains the cardinality and direction(Single or both). If possible, kindly post the PBIX file and repost the link here.

我尝试过的操作 无法建立四个连接之一

What I have tried: Not able to establish one of the four connections


更新:为这个问题提供了一笔赏金,因为我想看看该平面表的Star模式看起来如何。

我要在平板上寻找星型模式的原因之一是-例如,餐厅菜单是一个维度,而购买的食物是事实。如果将它们组合成一张桌子,您将如何识别从未订购的食物?为此,在您下第一笔订单之前,如何确定菜单上有哪些食物?

One of the reason I am looking for a star schema over a flat table is - For example, a restaurant menu is a dimension and the purchased food is a fact. If you combined these into one table, how would you identify which food has never been ordered? For that matter, prior to your first order, how would you identify what food was available on the menu?

推荐答案

您的问题尚不清楚,所以我只解决这部分内容:

The scope of your question is rather unclear, so I'm just addressing this part of the post:


信息中心将有一个过滤器选项可供选择一个星期的数字。如果选择了该星期数,它将显示已提交和已完成的星期数中这些请求的详细信息。

the dashboard will have a single filter choice to select a week number. If that week number is selected, it will show the details of these requests from submitted and completed week number.






获得逻辑的一种方法是使用断开连接的参数表,并使用所选参数编写度量。例如,考虑以下模式:


One way to get OR logic is to use a disconnected parameter table and write your measures using the parameters selected. For example, consider this schema:

如果您输入 WN 在切片器上,然后您可以编写一个度量以根据所选的数量过滤表格。

If you put WN on a slicer, then you can write a measure to filter the table based on the number selected.

WN Filter = IF(COUNTROWS(
                INTERSECT(
                    VALUES(WeekDimension[WN]),
                    UNION(
                        VALUES(MasterTable[SWN]),
                        VALUES(MasterTable[CWN])))) > 0, 1, 0)

然后,如果将该度量用作可视级别过滤器,则可以查看与 WN 选择相对应的所有记录。

Then if you use that measure as a visual level filter, you can see all the records that correspond to your WN selection.

如果可以阐明您的问题,使其更接近于 mcve ,那么您可能会得到更好的答复。我不能完全确定您遇到的具体想法。

If you can clarify your question to more closely approach a mcve, then you'll likely get better responses. I can't quite determine the specific idea you're having trouble with.

这篇关于在建立关系的同时避免歧义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆