Forum Discussion
Group By with condition
- 5 years ago
Anonymous If you do the GROUPBY as shown, you should be able to reference [startDate], [endDate] and [TotalAmt] columns. You would not use any kind of prefix when referencing these columns.
Greg_Deckler Thank you for the reply, I tried using Var but, I'm not able to refer to the columns inside the table variable for the comparison
Anonymous If you do the GROUPBY as shown, you should be able to reference [startDate], [endDate] and [TotalAmt] columns. You would not use any kind of prefix when referencing these columns.
- Anonymous5 years agoNot applicable
Greg_Deckler It worked!! Thank you 🙂
But for comparison I had to refer to those dim table columns
OverallAmount =
var calctab=GROUPBY(
factTab,
dim1[startDate],
dim2[endDate],
"TotalAmt",
SUMX(
CURRENTGROUP(),
factTab[total_amount]
)
)
return
SUMX(
FILTER(
calctab, dim1[startDate]<dim2[endDate],
[TotalAmt]
)