Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to change the relationship based on selection?

Hi, 

 

I have a simple problem with data connectivity in Power BI Desktop,
First, i have a donut chart showing the numbers of projects by their status for October 2020 Period, as normally, when i clicked the status, the card visualization linked to the number of projects showing the right amount of projects (101 + 1) (attached)

elvinluvian_0-1604995841260.png

elvinluvian_1-1604995883877.png

My problem is, when i changed the month to September, the card is not tally with numbers of projects mentioned in the donut chart. It still follows the number of projects from October which is 101 +1 instead of 105 in total(attached).

elvinluvian_3-1604996079858.png

additional information, here is the formula i used in donut chart values

Pie Chart Value =

SWITCH (
Selectedvalue('Table'[Month Selection]),
"September",calculate(count('Append'[Status September 2020]),userelationship(Tabel_Status[Status],'Append'[Status September 2020])),
"Oktober",calculate(count('Append'[Status Oktober 2020]),userelationship(Tabel_Status[Status],'Append'[Status Oktober 2020])),
"November",calculate(count('Append'[Status September 2020]),userelationship(Tabel_Status[Status],'Append'[Status November 2020])),
"Desember",calculate(count('Append'[Status September 2020]),userelationship(Tabel_Status[Status],'Append'[Status Desember 2020])))
 

While the legend use 

 
 

Status for Pie Chart LegendStatus for Pie Chart Legend

 and a relationship:Screenshot (668).png

 

I do know that the October relationship is in active, so the card follow the October relationship, is there any advise to linked the card to tally the number of projects in the donut chart? since the values in donut chart already reflected the 'userelationship' functions. Please advise

 

Thank You

Elvin Luvian

1 REPLY 1
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

If possibel,could you pls upload your .pbix file to onedrive business and share the link with us?

 

Remember to remove the confidential information.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors