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

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

Reply
mda
Advocate I
Advocate I

Show values from different rows in one row based on two slicers selection

I have a Table with those columns: Country, Year, Value.

 

I also have two slicers - on each of them I can select only one year.
Both of this slicers are using Year columns from two different tables Years1, Years2 created as:

SUMMARIZE(Table; Table[Year]).

 

Now I want to show a table with those values:

Country, Value for year from the first slicer, Value for year from the second slicer

 

I can read slicer selected value, but it can be accessed only in a measure like this:

 

Selected Yea 1r = IF (
   ISFILTERED ( Year1[Year] ) && HASONEVALUE (Year1[Year] );
   LASTNONBLANK ( Year1[Year]; 0 );
   2017
)

 

The problem is that I can't use in any table join or filter

 

So I don't know how to do solve this problem.

 

Can anyone help?

 

Thanks,

Marcin

1 ACCEPTED SOLUTION

Yes, I figured it out.
Instead of that, I self-joined that table and after that, I had all combinations and now filtering is possible.

 

Marcin

View solution in original post

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@mda

 

In Power BI Desktop, the calculated table is evaluated before you take selection in slicer. So you can dynamically show the values via measure based on the selection in slicer. And since you don't have relationships between the source table and those two year tables your measure will always show the last non blank value in year table. 

 

Regards,

Yes, I figured it out.
Instead of that, I self-joined that table and after that, I had all combinations and now filtering is possible.

 

Marcin

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.