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
LilaySlays
Regular Visitor

Measure based on slicer selection from another table

Hello community,


In the table "Reports," there are the following columns: Date, Info, and Week_No. In the table "Dates," there are the following columns: GID, Week number, PEP. The two tables are linked by the Week number. On the report page, I am using a filter with the "Week_No" column from the "Reports" table. When I set the filter to a specific week, I want a table to display the values of the "PEP" column if the Week number from the "Dates" table is equal to the selected Week number + 1.

LilaySlays_0-1701384897664.png

 


With the following measure I only get blank values:

 

PEP_KW1 = 
VAR SelectedWeek = SELECTEDVALUE(Reports[Week_No])
VAR TargetWeek = SelectedWeek + 1
RETURN
CALCULATE(
            FIRSTNONBLANK(Termine[PEP],1),
             FILTER(
                Termine,
                Termine[Week_no] = TargetWeek
             )
)

 



Thanks for your help.


1 ACCEPTED SOLUTION
LilaySlays
Regular Visitor

Hallo everyone,

I have been able to solve the problem. Here is the solution:

x_KW1 = 
VAR SelectedWeek = SELECTEDVALUE(report[KW])
VAR NextWeek = SelectedWeek + 1
RETURN
CONCATENATEX(
    FILTER(
    'time',  
    'time'[KW] = NextWeek
),
'time'[x],
UNICHAR(10)
)

View solution in original post

4 REPLIES 4
LilaySlays
Regular Visitor

Hallo everyone,

I have been able to solve the problem. Here is the solution:

x_KW1 = 
VAR SelectedWeek = SELECTEDVALUE(report[KW])
VAR NextWeek = SelectedWeek + 1
RETURN
CONCATENATEX(
    FILTER(
    'time',  
    'time'[KW] = NextWeek
),
'time'[x],
UNICHAR(10)
)
LilaySlays
Regular Visitor

Ok, it is now working. I deactivated the relationship between the both table. But It only shows me 1 result when more matches are expected.

vicky_
Super User
Super User

Maybe try to change the part in the FILTER() to:

FILTER(
                ALL(Termine[Week_no]),
                Termine[Week_no] = TargetWeek
             )

 

Thanks.It is not working. 😞

 

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.