Forum Discussion
yasbos
2 years agoResolver II
Allselected doesn't work on a table variable
Hi. I have a table variable consisting of var TotalTime= ADDCOLUMNS( summarize(Tbl1 ,Tbl1[ID]) , "Duration" ,calculate( ...
Jihwan_Kim
2 years agoSuper User
Hi,
I am not sure how your semantic model looks like, but please try something like below whether it suits your requirement.
VAR TotalTime =
SUMMARIZE (
ADDCOLUMNS (
SUMMARIZE ( Tbl1, Tbl1[ID], calendar[Date] ),
"Duration",
CALCULATE (
SUM ( Tbl1[duration] ),
t2_Dim[status] <> "Complete",
ALLSELECTED ( calendar )
)
),
Tbl1[ID],
[Duration]
)
yasbos
2 years agoResolver II
Hi. Thanks. Unfirtunately, it is not the calendar that is an issue. The whole measure works fine without a table variable. It's the variable that causes it to malfunction. I don't undredtand why. I didn't break lineage.