Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

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)

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).

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 Legend

 and a relationship:

 

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

  • v-kelly-msft's avatar
    v-kelly-msft
    Icon for Community Support rankCommunity 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!