March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I built measure to return 1 if user have made at least one calls over a day. So I have to get count of days when user tried to call
Calls = CALCULATE(COUNT(Calls[CALL_ID]);
USERELATIONSHIP(Calls[USER_ID];Users[USER_ID]);
USERELATIONSHIP(Calls[CALL_DATE];Calendar[Date]))
Period = VAR res = SUMMARIZECOLUMNS(Users[USER_ID]; Calendar[Date]; "Period";SUMX(Users;IF([Calls]>0;1;BLANK()))) RETURN res
When I create separete table using Period measure, I get true calculation:
http://prntscr.com/hoo52e
But when i try to calculate
SumOfPeriods = VAR res = SUMMARIZECOLUMNS(Users[USER_ID]; Calendar[Date]; "Periods";SUMX(Users;IF([Calls]>0;1;BLANK()))) RETURN SUMX(res;[Periods])
I get error:
SummarizeColumns() and AddMissingItems() may not be used in this context
Is it possible to calculate sum of SUMMARIZECOLUMNS result?
Help please
Solved! Go to Solution.
Here is answer
It was necessary to add USERELATIONSHIP in CALCULATETABLE for data-table
Periods = SUMX( SUMMARIZE( CALCULATETABLE(Calls; USERELATIONSHIP(Calls[USER_ID];Users[USER_ID]); USERELATIONSHIP(Calls[CALL_DATE];Calendar[Date])); Calendar[Date];Users[USER_ID];"Periods";IF([Calls]>0;1;BLANK()));[Periods])
Here is answer
It was necessary to add USERELATIONSHIP in CALCULATETABLE for data-table
Periods = SUMX( SUMMARIZE( CALCULATETABLE(Calls; USERELATIONSHIP(Calls[USER_ID];Users[USER_ID]); USERELATIONSHIP(Calls[CALL_DATE];Calendar[Date])); Calendar[Date];Users[USER_ID];"Periods";IF([Calls]>0;1;BLANK()));[Periods])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |