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.
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.
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |