Forum Discussion
Group By Won't Work - How to aggregate?
Hi theitguy, Just a query here are all the fields coming from same table ?
Hi Hardik,
the fields from the Learning Sessions are from the same table, yes.
Orginally, I duplicated the Learning Sessions-Query (by referencing the original) and did the grouping in the new table which worked very well by using power query formulas. It was easy to group the sessions into tests and get the desired values.
But today I noticed, that my colleagues will find it hard to set filters in the future, because it is hard to identifiy whether they set filters for the table with the sessions or the aggregated table. Therefore, I am trying to do all the grouping stuff via measures.
EDIT: I think, the problem is that I have to aggregate the values I get again, so that I receive a scalar value. Even if I cannot determine value on a user-test basis then. I have tried the following, but even that does not work:
Seconds_Spend_Corrected_Grouped = VAR MYTempTable = SUMMARIZE(Learning_Sessions;Learning__Sessions["Unique_Test_ID];"Seconds";SUM(Learning__Sessions[Seconds_Spend])) RETURN AVERAGE(MyTempTable[Seconds])