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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
faridzridzwan
New Member

Need help with creating subset table using filter()

Hi everyone,

 

In a bit of a pickle here.

i have been trying to create a subset of my main table using selectedvalues() from a slicer.

 

mth  | ID | Savings
31/01/2023 | A123 | 50,000
28/02/2023 | A123 | 60,000
31/01/2023 | B456 | 35,000
28/02/2023 | B456 | 30,000
31/01/2023 | C789 |15,000

 

measure
 start_mth = format(SELECTEDVALUE(onboarding_base[mth]),"DDMMYYYY")

i tried the simple way of 

track_end_filtertable =
 Filter(FILTER(onboarding_base,onboarding_base[mth]=[start_mth]),onboarding_base[period_idmmmyy]=[start_mth])

 

This doesnt work.

I also tried to break it down the measure  further as follows but it failed too.

Measure

track_start_min_period_id =
var v_m = format(SELECTEDVALUE(onboarding_base[min_period_id]),"DDMMYYYY")
var v_year = format(right(v_m,4),"")
var v_day = format(left(v_m,2),"")
var v_mth = format(left(right(v_m,6),2),"")
var v_date_sel = datevalue(v_day&"/"&v_mth&"/"&v_year)
return DATEVALUE(v_date_sel)

 

table

track_start_filtertable =
var v_date = [track_start_min_period_id]
return filter(filter(onboarding_base,onboarding_base[min_period_id]=[track_start_min_period_id]),onboarding_base[period_id]=[track_start_min_period_id])
 
Lastly i also broke the date down and used date (year,month,day). Again.. no success.
 
However in all instances, if i were to hard code the dates, the subset filtered table is created successfully.
 
Im at wits end! appreciate the help!

 

1 REPLY 1
FreemanZ
Super User
Super User

hi @faridzridzwan ,

 

it doesn't work, because a calculated table (or column) is not supposed to respond to any behavior of report visuals, like slicer selection. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.