cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ichebobo Member
Member

Relationship and Graph Response problem

 

 

Hi,

I am selecting the data from a ShopName depending on the day selected. 

The DAX for the lookupvalue is :

ShopName = LOOKUPVALUE(SHOP[SHOP],SHOP[Production],[Production],SHOP[REGION],RELATED(B01_Trade[REGION]))

 

And the DAX that controls and outputs the ShopName is:

 

ShopNames = FILTER(VALUES(B01_Tata[ShopName]),ISBLANK([ShopName])=FALSE())

 

For example, if  I select Shop1 on the 16th day as below:

 

Tx4.PNG

 The graphs works fine when showing day interactions (above)

 

But if I select a day from the above graph, the below data and graph do not respond appropriately. The shopName changes but the data remains the same.

Tx4_2.png

 

I would like to show the graph and interaction for the 30MinsProduction. But this is not happening.

 

Please assist

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator v-yuezhe-msft
Moderator

Re: Relationship and Graph Response problem

@ichebobo

I note that I use wrong DAX to create date column in MeterHHConsumption table, I have edited my previous reply, you should get correct result now.

Also, in MeterHHConsumption table, you can use the DAX below instead to create Date column, and create relationship between the table and Date table using this date column, then you will also get expected result.

Date = MeterHHConsumption[DataTime].[Date]


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Moderator v-yuezhe-msft
Moderator

Re: Relationship and Graph Response problem

@ichebobo,

What is the expected result would you like to show in the second graph when you select day in the first graph? Would you mind sharing me the PBIX file? You can upload the PBIX file to OneDrive and send me the shared link of the file via Private Message.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Moderator v-yuezhe-msft
Moderator

Re: Relationship and Graph Response problem

 

@ichebobo,

In your scenario, you don't have relationship between A2011_ConfigData table and MeterHHConsumption, thus when you click the day in the first chart, the third chart is not filtered.

You can create a Date column in the MeterHHConsumption using DAX below.

Date = DATE(YEAR(MeterHHConsumption[DataTime]),MONTH(MeterHHConsumption[DataTime]),DAY(MeterHHConsumption[DataTime]))


Then create a new table using DAX below, and create relationship among the three tables(A2011_ConfigData,MeterHHConsumption,DateTable) as shown in the following screenshot.

DateTable = 
FILTER(
DISTINCT(
UNION(
DISTINCT(A2011_ConfigData[Date]),
DISTINCT(MeterHHConsumption[Date])
)
),
NOT(ISBLANK(A2011_ConfigData[Date]))
)


This way, the third chart will be filtered correctly.
1.JPG

Regards,
Lydia

 

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ichebobo Member
Member

Re: Relationship and Graph Response problem

Hi ,

 

Great Thanks

Your solution:

But The Chart dispappears whenever  I select a particular day??

Highlighted
Moderator v-yuezhe-msft
Moderator

Re: Relationship and Graph Response problem

@ichebobo

I note that I use wrong DAX to create date column in MeterHHConsumption table, I have edited my previous reply, you should get correct result now.

Also, in MeterHHConsumption table, you can use the DAX below instead to create Date column, and create relationship between the table and Date table using this date column, then you will also get expected result.

Date = MeterHHConsumption[DataTime].[Date]


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.