Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi, I have inactive relationships set up between 'MyReport' and 'LegendCategories' table; however, I am still seeing the error 'USERELATIONSHIP function can only use the two columns references participating in relationship' in this code:
Varible =
SWITCH(
TRUE(),
---------GENDER---------
SELECTEDVALUE(LegendCategories[Field]) = "Gender",
CALCULATE(
[CountPersons], #custom measure to count the number of names in a column
USERELATIONSHIP('MyReport'[Gender], LegendCategories[Category])
),
---------Race---------
SELECTEDVALUE(LegendCategories[Field]) = "Race",
CALCULATE(
[CountPersons], #custom measure to count the number of names in a column
USERELATIONSHIP('MyReport'[Race], LegendCategories[Category])
),
BLANK()
)
I rechecked the relationships, confirmed the spellings, interchanged the syntax of USERELATIONHIP such that 'many' table comes before the 'one' table (as I have 'Many to 1' relationship set here). Nothing seems to be working! Any advice?
Thanks so much!
@shefali_13 , hope you have created an inactive/active relationship between USERELATIONSHIP('MyReport'[Race], LegendCategories[Category]) or USERELATIONSHIP('MyReport'[Gender], LegendCategories[Category])
if the relationship is missing, then you get an error like above
example
Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
56 | |
35 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |