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
Hi
I'm creating a new table using SummarizeColumn. Here's teh code.
The code below, works fine and I get the table built properly:
SUMMARIZECOLUMNS(
'Transactions'[FullDocumentNumber],
'Transactions'[PersonID],
'Transactions'[PersonName],
Filter('Transactions','Transactions'[Quarter]<>"2021-Q1" && 'Transactions'[Quarter]<>"2021-Q2" && 'Transactions'[Adjustments]="SALES" && 'Transactions'[BONUS]="YES"),
"BookedValue ($)",SUM('Transactions'[BookedValue ($)]),
"SALES",KPIs[Total Sales],
"Total GL Amount", [TotalRevnueGLAmounts],
"Pay or Not", if(
[BookingValue]=0 && KPIs[Total Sales]=0,"NO BONUS","BONUS"),
"Bonus ($)",if([BookingValue]=0 && KPIs[Total Sales]=0,0,0.001*[TotalGLAmounts]))
When I add another column called 'Transactions'[Quarter], I get the error message in the screenshot at end of this post.
SUMMARIZECOLUMNS(
'Transactions'[FullDocumentNumber],
'Transactions'[PersonID],
'Transactions'[PersonName],
'Transactions'[Quarter], // ===> THIS LINE CAUSES TROUBLES
Filter('Transactions','Transactions'[Quarter]<>"2021-Q1" && 'Transactions'[Quarter]<>"2021-Q2" && 'Transactions'[Adjustments]="SALES" && 'Transactions'[BONUS]="YES"),
"BookedValue ($)",SUM('Transactions'[BookedValue ($)]),
"SALES",KPIs[Total Sales],
"Total GL Amount", [TotalRevnueGLAmounts],
"Pay or Not", if(
[BookingValue]=0 && KPIs[Total Sales]=0,"NO BONUS","BONUS"),
"Bonus ($)",if([BookingValue]=0 && KPIs[Total Sales]=0,0,0.001*[TotalGLAmounts]))
How can I overcome this issue?
Solved! Go to Solution.
What relationships do you have to your calculated table? (Power Bi may have added them automatically). Remove any that are there, try your code again and then replace the relationships that you need. When you put the quarters in I suspect yoi start to get duplicates of maybe PersonId which is fine. However powerbi has already set a relationship based on a previous cardinality.
@bcdobbs thanks for your prompt response.
There are no relations and still same error message.
What relationships do you have to your calculated table? (Power Bi may have added them automatically). Remove any that are there, try your code again and then replace the relationships that you need. When you put the quarters in I suspect yoi start to get duplicates of maybe PersonId which is fine. However powerbi has already set a relationship based on a previous cardinality.
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 |
---|---|
122 | |
89 | |
74 | |
59 | |
53 |
User | Count |
---|---|
196 | |
120 | |
108 | |
68 | |
65 |