在与 DAX 中的 where 子句不同的列上执行 select?
Do a select on different column than where clause in DAX?
我想在 DAX 变量中实现这个“sql”代码
Select WeekYearWeekNumber from DimDate where Date = today()+7
如何实现?
到目前为止我有这段代码,但它不起作用,因为 nextw 不仅仅是一列......
var nextw =
FILTER(
SUMMARIZE('Date','Date'[Week Year Week Number],'Date'[Date]) ,
'Date'[Date]=TODAY()+7
)
var NextWCS =
FILTER(
SUMMARIZE(Staff, Staff[K_Emp], Staff[StaffingType], 'Date'[Week Year Week Number], Staff[IsTmed],
"sumat", SUM(Staff[Hours])
),
'Date'[Week Year Week Number]=nextw
)
这将 return nextw 的单个值:
var nextw = LOOKUPVALUE('Date'[WeekYearWeekNumber],'Date'[Date],TODAY()+7)
我想在 DAX 变量中实现这个“sql”代码
Select WeekYearWeekNumber from DimDate where Date = today()+7
如何实现?
到目前为止我有这段代码,但它不起作用,因为 nextw 不仅仅是一列......
var nextw =
FILTER(
SUMMARIZE('Date','Date'[Week Year Week Number],'Date'[Date]) ,
'Date'[Date]=TODAY()+7
)
var NextWCS =
FILTER(
SUMMARIZE(Staff, Staff[K_Emp], Staff[StaffingType], 'Date'[Week Year Week Number], Staff[IsTmed],
"sumat", SUM(Staff[Hours])
),
'Date'[Week Year Week Number]=nextw
)
这将 return nextw 的单个值:
var nextw = LOOKUPVALUE('Date'[WeekYearWeekNumber],'Date'[Date],TODAY()+7)