问题描述
我有一个报告页面,其中包含有关汽车和自行车的表格.它们每个都是一个单独的表,例如:
I have a report page which contains tables about cars and bikes. Each of them is a separate table like:
Cars
Id | CarName | Time1
Bikes
Id | BikeName | Time2
这些表之间没有关系,但是它们必须显示在同一页面中.我如何使用 Slicer
或 Timeline 2.0.1
只过滤一次日期来同时操作所有仪表板?
There are no relationships between these tables however they must be displayed in same page. How can i use a Slicer
or a Timeline 2.0.1
to manipulate all dashboards simultaneously by just filtering once the date?
即如果我选择 01/01/19-02/02/19 之间的时间间隔,它将按字段 Time1
过滤 Cars
,按 Bikes
过滤 Bikes
code>Time2 并相应地显示仪表板?非常感谢!
I.e. If i select interval between 01/01/19-02/02/19 it will filter the Cars
by field Time1
and the Bikes
by Time2
and display the dashboards accordingly?Thanks so much!
推荐答案
构建一个 CalendarTable 并将表自行车和汽车链接到它.您可能会发现很多 CalendarTables 的命题.然后在 CalendarTable 上制作切片器.注意不要在事实表自行车或汽车上制作切片器.
Build a CalendarTable and link both tables bikes and cars to it. You may find lots of propositions of CalendarTables. Then make slicer on CalendarTable. Beware not to make slicer on your fact tables bikes or cars.
使用 CalendarTable 比过滤多个表的可能性更大.即使只有一个表格,我也会使用 CalendarTable,因为它包含完整的日期列表——你的自行车表可能没有——这就是时间智能功能正常工作的原因.请注意性能 - 对小而独特的 CalendarTable 进行切片比大事实表更快.
There are more advantages to using CalendarTable then just the possibility of filtering multiple tables. I would use CalendarTable even with a single table because it contains complete list of days - your bike table may not - and that is why time intelligence functions work properly. And mind the performance - slicing small and unique CalendarTable is faster then big fact tables.
这是一个简单的 CalendarTable 示例.在菜单建模/新表中选择:
Here is an example of simple CalendarTable. Choose in menu Modeling / New Table:
Calendar =
GENERATE (
CALENDAR (
DATE ( 2016, 1, 1 ),
DATE ( 2020, 12, 31 )
),
VAR CurrentDay = [Date]
VAR day = DAY ( CurrentDay )
VAR month = MONTH ( CurrentDay )
VAR year = YEAR ( CurrentDay )
VAR YM_text = FORMAT ( [Date], "yyyy-MM" )
RETURN
ROW (
"day" , day,
"month" , month,
"year" , year,
"YM_text" , YM_text
)
)
设置最小和最大日期.这里从 2016-01-01 到 2020-12-31.
Set up min and max date. Here from 2016-01-01 to 2020-12-31.
这篇关于切片器同时跨表管理多个列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!