Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello,
I can't figure out what the problem is with the following Measure:
Measure = CALCULATE(COUNTROWS(Table1),FILTER(Table1,Table1[Column1]="text")), USERELATIONSHIP(table1[column2],table2[column2])
The Calculate/Filter portion of the measure work fine. And the USERELATIONSHIP expression works fine on its own and in other measures. It's only when I put the two together that I start seeing problems. What's the issue?
Thanks for your help!
Solved! Go to Solution.
Well, if the CALCULATE is closed, then what is the USERELATIONSHIP part of? It wouldn't be part of any calculation at all from what I can see in the formula.
You either want to drop this additional parenthesis, so that USERELATIONSHIP is included in your CALCULATE, or add another CALCULATE( before the first one.
From what you wrote, it seems you want to nest CALCULATEs, but I am not sure to understand why.
Edit: In the latter case, you also want to add an additional parenthis after USERELATIONSHIP(...)
What error message/issue do you have?
It seems to me you have an extra parenthesis right after your FILTER argument.
It says "The syntax for 'USERELATIONSHIP' is incorrect.
WOuldn't two parentheses after Filter be correct? The first one closes the Filter argument and the second one closes the Calculate function.
You either want to drop this additional parenthesis, so that USERELATIONSHIP is included in your CALCULATE, or add another CALCULATE( before the first one.
From what you wrote, it seems you want to nest CALCULATEs, but I am not sure to understand why.
Edit: In the latter case, you also want to add an additional parenthis after USERELATIONSHIP(...)
@LaurentCouartou @Greg_Deckler Thank you both! My (stupid) mistake was not inlcuding the USERELATIONSHIP function in Calculate... I was treating them as separate things. I removed the extra parenthesis and it worked fine.
Well, if the CALCULATE is closed, then what is the USERELATIONSHIP part of? It wouldn't be part of any calculation at all from what I can see in the formula.
For some added context, my goal is to create a measure that counts a filtered number of rows, and once it has that count, applies a specific relationship.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 40 | |
| 36 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 73 | |
| 73 | |
| 38 | |
| 35 | |
| 26 |