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

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.

Reply
ECE
Advocate II
Advocate II

Userelationship and interaction between visuals

Hi,

 

I have two graphs which shows the Sales Order Values (SO V), gruped by different dates (Created Date and Requested Date, both linked to my DataTable). I use the "UseRelationShip" function to make it work, and everything is fine, until I try to make the second graph, filter according to my selection in the first graph.

 

Here is what I have:

I have a FactTable with a Created Date and a Requested Date. The Created Date is linked to my DataTable as primary (active) relation. The Requested Date is linked as an inactive relationship.

 

I have two measures:

So Value by Cre. Date = 
CALCULATE(SUM('Order Intake'[SO V cr.date]);USERELATIONSHIP('Order Intake'[Created Date];DateTable[Date]))

and

So Value by Req. Date = 
CALCULATE(SUM('Order Intake'[SO V cr.date]);USERELATIONSHIP('Order Intake'[Requested Date];DateTable[Date]))


Graph 1 shows the So Value by Cre. Date, grouped by DateTable[Month] on the X axis.

Graph 2 shows the So Value by Req. Date also grouped by DateTable[Month] on the X axis. 

 

So far everything is being displayed as expected.

 

Now when I click on eg. Marts in Graph 1, I would expect my Graph 2 to show only the Sales Order Value for orders Created in Marts, but still grouped by Requested Date. However, this is not happening. Graph 2 only shows the bar for Marts.

 

Any ideas how to solve this?

8 REPLIES 8
vivran22
Community Champion
Community Champion

Hello @ECE 

 

Can you share the sample file with the expected results? It will help in providing appropriate solution.

 

Cheers!
Vivek

https://www.vivran.in/
Connect on LinkedIn

Hi,

Its not really possible to share the file, as it is part of a very big report ..
In case I manage to create a sample file, how would I actually upload it in here??

 

Br. ECE

vivran22
Community Champion
Community Champion

@ECE 

 

You may upload the sample file using onedrive or google drive and share the link.

 

Cheers!
Vivek

https://www.vivran.in/
Connect on LinkedIn

Hi @vivran22,

The Sample file can be found via:

 

https://www.dropbox.com/s/1s1fefif4yg615g/UseRelationShip%20Challenge.pbix?dl=0 

 

Thanks for your effort,

amitchandak
Super User
Super User

@ECE 

In case you do not want to filter these two charts by common date. You can use dates from fact and create these charts. That might fulfill this need.

Else you may have to go for a two date dimension. This is my initial thought.

Hi @amitchandak 

Thanks for your replay.
Your first solution is what I have done so far.. However, its not really ideal...

I would prefer not having to create extra colums in fact table, nor a second date table..

 

Br. Espen

HI @ECE ,

 

Create a duplicate of the calendar table and make an active relationship between this table and the requested date now use this table as the x-axis on the graphs were you want to have the requested calculations.

 

No need to use the Requested Measure on your data except when you want to compare requested and created on the shame chart.

 

Check PBIX file attach, chart 1 and 2 workihng as the 2 bottom ones.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix ,

 

First of all, thank you very much your replay.

I had hoped that it was possible to achieve the same result, without having to add extra tables / columns..

 

Br. Espen

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.