Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |