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
teylyn
MVP

how to show related data without direct relationship to slicer

Hi, I have data like the screenshot below.

 

the tblLocal has local data for student, course, standard and grade. The tblNational has columns for standardID, grade, and a nationwide value.  I have a lookup table called slicertable that is related to tblLocal via CourseID. This table is used to present a slicer with Faculty.

In the report, the user selects a Faculty in the slicer. The Matrix1 shows data from tblLocal, and shows only the standards in the selected Faculty. Fine.

 

My issue: How can I create the Matrix 2, that summarizes the highlighted StandardID rows and their Grade values from tblNational? I don't have the DAX knowledge to create that. 

 

The logic in words: filter tblNational to show all the StandardIDs that are currently showing in tblLocal, which is filtered by the slicer. 

 

 

data at the top , report at the bottomdata at the top , report at the bottom

1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@teylyn  if you got to Matrix A,  you can do the following to get to Matrix B. I assumed there is no relationship between national and local and national and slicer

 

 

Measure = 
CALCULATE (
    SUM ( national[value] ),
    FILTER (
        national,
        national[national.standardID] IN VALUES ( local[local.StandardID] )
    )
)

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

5 REPLIES 5
smpa01
Super User
Super User

@teylyn  if you got to Matrix A,  you can do the following to get to Matrix B. I assumed there is no relationship between national and local and national and slicer

 

 

Measure = 
CALCULATE (
    SUM ( national[value] ),
    FILTER (
        national,
        national[national.standardID] IN VALUES ( local[local.StandardID] )
    )
)

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

THANK YOU!! That was exactly what I need.

grantsamborn
Solution Sage
Solution Sage

Hi @teylyn 

I think 2 values in your Local matrix are incorrect:

StandardID: xxx - Grade: A - My result shows 1 whereas your's shows 2

StandardID: zzz - Grade: B - My result shows 1 whereas your's shows 0

 

Can you verify your numbers?

Yes, you are right. I made a mistake in the manually configured matrix.

Element115
Power Participant
Power Participant

Isn't it just a matter, in your model, of linking your Dim table (aka slicer table) to tblLocal.CourseID and tblLocal.StandardID to tblNationalStandardID?  That way, the slicer will look up entries in tblLocal by CourseID, which selects also the respective StandardID, which in turn selects the StandardID in tblNational, making all these columns available to your matrix visuals.

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.