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.

Relationship or measure not working

I have one dimension table called Dim_SegmentManagerEmployee which has a many to one relationship with Dim_Segment.  In a matrix, the rows include Dim_SegmentManagerEmployee[Segment], Dim_SegmentManagerEmployee[Manager], and Dim_SegmentManagerEmployee[Employee].  The value in the matrix is SUM(Fact_Table1[Target]). However, I need to display all values as zeros instead of BLANK() thus I created a measure which is Measure_Target=0+SUM(Fact_Table1[Target]). Let's say I have 3 segments called "Commercial", "Retail" and "Residential". 

 

Case 1: If I have a slicer to select Dim_SegmentManagerEmployee[Segment] at the top of the page. It works fine.

Case 2: However, due to other reasons I have to use the slicer of Dim_Segment[Segment] (The relationship from  Dim_SegmentManagerEmployee to Dim_Segment is many to one and single direction). In this case, if my measure is Measure_Target=SUM(Fact_Table1[Target]), it works and only selected segment will be displayed. However, I have to display all BLANK value as zero. If my measure is Measure_Target=0+SUM(Fact_Table1[Target]) and select Dim_Segment[Segment]="Commercial" on the slicer. Only the segment of "Commercial" should be displayed on the matrix but other segments ("Retail" and "Residential") are also displayed (and the values are zero).

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @Anonymous, 

 

What's the relationship between the Dim_SegmentManagerEmployee table and Fact_Table1.As the relationship between Dim_SegmentManagerEmployee and Dim_Segment is single direction, please ensure there is a relationship from Dim_Segment to Dim_SegmentManagerEmployee then to Fact_Table1. 

 

w1.PNG

 

Best Regards,
Qiuyun Yu

Anonymous
Not applicable

Yes, there is relationship from Fact_Table to Dim_SegmentManagerEmployee and then from Dim_SegmentManagerEmployee to Dim_Segment. My point is if the Measure_Target=SUM(Fact_Table1[Target]) then only the selected Segment (in this case "Commercial") appear in the visual (matrix). But when Measure_Target=0+SUM(Fact_Table1[Target]) then all, all Segments  ( "Commercial","Retail" and "Residential") appear in the visual.

v-qiuyu-msft
Community Support

Hi @Anonymous, 

 

Would you please share a pbix file with us? If it's possible, please remove sensitive data in the report then upload pbix file to your OneDrive, paste the share link here. 

 

Best Regards,
Qiuyun Yu