我正在尝试在power bi中添加日历表..这是我的添加方式
Calender = ADDCOLUMNS(CALENDAR (DATE(1995,5,1), DATE(2019,12,31)),
"Year",FORMAT([Date],"YYYY"),"Quarter","Q" &FORMAT([Date],"Q"),
"Month",FORMAT([Date],"MM"),"MonthName",FORMAT([Date],"MMM"),"Monthnumber", FORMAT ([Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),
"YearMonthShort", FORMAT ( [Date], "YYYY/mmm" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date] ),
"DayOfWeek",FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "ddd" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ))
查看这张图片
这些是更多表
现在我想问一下我如何在orders_Fact表中添加和链接日期键,而事实表中没有日期键列。我通过查询手动创建它。当我从主页选项卡上单击编辑查询时,我没有在此面板中找到日历表
这是文件链接 https://www.dropbox.com/s/tdsf0xhogr4opgr/test_fle.pbix?dl=0
答案 0 :(得分:0)
您的日历表由DAX创建,实际上在“编辑查询”视图中不可见。 我将检查日历是否在Power Query Editor的关系视图的右侧(向右滚动) 否则,尝试在事实表的OrderDate和日历表中的Date与功能区窗格中的“管理关系”之间创建关系。