Forum Discussion

ECE's avatar
ECE
Advocate II
6 years ago

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

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

    • ECE's avatar
      ECE
      Advocate II

      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

      • MFelix's avatar
        MFelix
        Super User

        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.

    • ECE's avatar
      ECE
      Advocate II

      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