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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Measure Not Working With Relationship?

Hi,

 

I have two tables.

 

First is the fact table with my transactions, in which I have the Customer Name and order intake.

Second is the dim table with Customer Name and Customer Segment, Customer Type.

 

There is a relationship between dim_Customer and fact_Install based on Customer Name. The relationship is many to one with a single cross filter direction.

 

There is also a calendar table because I have measures like:

Order-Intake-CY =
switch(SELECTEDVALUE(dim_Scenario[Scenario]),
"MTD",TOTALMTD([Order-Intake-Sum],'dim_Calendar'[Date]),
"QTD",TOTALQTD([Order-Intake-Sum],'dim_Calendar'[Date]),
"YTD",TOTALYTD([Order-Intake-Sum],'dim_Calendar'[Date]))

Order-Intake-Sum = 
sum(fact_Install[Order Intake])

 

Current Output:

Output02.JPG

 

Desired Output (I have used the column from fact_Install table instead of measure, but I need a measure to show various scenarios MTD QTD YTD):

Output01.JPG

 

 

5 REPLIES 5
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

This may cause by the context of the measure.

Based on your description, the relationship between the two tables is created based on the customer name, and the context used in the pie chart is Customer Segment?

There is no direct relationship between customer segment and order intake.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

But the customer segment is part of the dim_Customer table and the order intake is part of fact_Install table. 

 

So, if I have a dataset like mentioned on top - how can I show the order intake by customer segment?

amitchandak
Super User
Super User

@Anonymous , I am assuming you have created a measure slicer. Remember in Time intelligence, if date is not selected on-page, the end date of ytd, mtd,qtd will end date of the calendar . So that can be an issue.

 

Slicer -https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern

Power BI — YTD Questions — Time Intelligence 1–5
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
Power BI — QTD Questions — Time Intelligence 2–5
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
Power BI — MTD Questions — Time Intelligence 3–5
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e

 

 

Hi @Anonymous ,

 

Try to add the Customer Name to the legend.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

@amitchandak 

 

thank you for your reply. Yes, I do have a measure slicer in which users select a particular month and year. However, I still don't understand why my measure is not working.

 

I noticed that when I added a calculated column (lookup with customer name to get the customer segment) to my fact table, all visuals behave as expected... but why it is not working without these calculated columns, just based on the relationship?

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors