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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Output related data from Table

Hi,

 

Please Help.

 

I created a table as below and made relationships.

 

MAKE

MATERIAL

PAPI

LONG

LAND

LONG

CART

LONG

PAPI

SHORT

LAND

SHORT

CART

SHORT

PAPI

MEDIUM

LAND

MEDIUM

CART

MEDIUM

 

Below is the DAX that controls and outputs each of the material.

 

Total = IF

 (ISFILTERED(TOPO[REGION]),

    SWITCH(FIRSTNONBLANK(TOPO[StationID3], TOPO[REGION]),

            "LONG", [LONG],

            "SHORT", [SHORT],

            "MEDIUM",[MEDIUM],

                           BLANK()))

 

This is what I get when I select a  Material.

 

tt.PNG

 

Below is what I am expecting to output

 

What is expected.PNG

 

 

I want such that if I select LONG, it will output its related data . ie  : PAPI, LAND and CART on same graph.

 

Thanks for your help

 

11 REPLIES 11
Anonymous
Not applicable

Hi,

 

I've tried getting help.  but still stucked..

 

I created a table as below and made relationships.

 

MAKE

MATERIAL

PAPI

LONG

LAND

LONG

CART

LONG

PAPI

SHORT

LAND

SHORT

CART

SHORT

PAPI

MEDIUM

LAND

MEDIUM

CART

MEDIUM

 

Below is the DAX that controls and outputs each of the material.

 

Total = IF

 (ISFILTERED(TOPO[REGION]),

    SWITCH(FIRSTNONBLANK(TOPO[StationID3], TOPO[REGION]),

            "LONG", [LONG],

            "SHORT", [SHORT],

            "MEDIUM",[MEDIUM],

                           BLANK()))

 

This is what I get when I select a  Material.

 

tt.PNG

 

Below is what I am expecting to output

 

What is expected.PNG

 

 

I want such that if I select LONG, it will output its related data . ie  : PAPI, LAND and CART on same graph.

This DAX works for a similar on Page 1 and Page 2 .

The problem is page 3

 

 

 Please help

 

Anonymous
Not applicable

Hi @Anonymous,

 

You can create line chart with these date and use MATERIAL as legend. Slicer with 'MATERIAL' column as source.
After these steps, you can use slicer to control display line amount.

 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Many thanks for your help.

 

Moreover, I have tried your workaround and suggestion but still do not get the desired three lines   to appear on selection of the legend. 

Anonymous
Not applicable

Hi @Anonymous,

 

I'm not so clarify for your scenario, can you please share us sample pbix file for test?

 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi Xiaoxin Sheng,

 

I've shared the Pbix to your email.

 

Many Thanks

 

Ichebbo

Anonymous
Not applicable

HI @Anonymous,

 

Based on test, your measure 'TotalTemperature' not works, when chosen multiple item, it only calculate with firstnonblank value, "Block A Heat.

 

In addition, I also check your relationship, it seems like you use 'single' mode of cross filter direction to link each tables.

For single relationship, filter effect only works on one side.

 

Regards,

XIaoxin Sheng

Anonymous
Not applicable

Hi XIaoxin Sheng,

 

I've done cross filter on both in the relationship but  Still dont get the desired result.

Please Can you help with an appropriate DAX that will not use firstnonblank.??

Is there a better way to create the STATIONID3s table? 

I've been in a fix and have not been able to move forward.

 

Thanks

Ichebobo

Anonymous
Not applicable

Hi,

 

I've done cross filter on both in the relationship but  no way forward.

Please Can you help with an appropriate DAX or workaroubnd that will not use firstnonblank.??

 

 

Many Thanks

 

Anonymous
Not applicable

Hi @Anonymous,

 

I'd like to suggest you use 'in' keyword with allselected/values functions to deal with multiple selection scenario.

 

Reference link:

From SQL to DAX: IN and EXISTS

 

BTW, I also have no idea how to deal with your relationship, when I try to change filter mode, power bi return errors.


Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi Xiaoxin Sheng,

 

Thanks for your time.

I’ve updated the PBix to display all the expected visuals.

Page 1 and Page 2 are OK.

The problem is page 3 ie the STATIONID3  has smilar DAX expression as STATIONID, STATIONID2"  but do not display data.

Also I tried using another DAX expression for STATIONID3:

****************************************

IF (ISCROSSFILTERED
SWITCH(TRUE(),
VALUES
VALUES
VALUES
BLANK()))

 ************************************************still no success

I am still learning how to use IN and EXIST.

I've sent the updated PBix file to your email. 

Please help.

 

Many Thanks

Ichebobo

 

 

 

Anonymous
Not applicable

Hi,

 

Please Can you help with an appropriate DAX or workaround.??

I used a DAX expression for page1, Page2 and Page3 visuals 

Page 1 and Page 2 are OK.

The problem is page 3 as it does not display data.

 

Many Thanks

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.