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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Steven120
New Member

Using Filter and SelectedValue to create a table

Hello all,

I am trying to create a new table using the following but it returns a blank table. 

New Table = FILTER(Data_Validation_2,Data_Validation_2[Valid] = SELECTEDVALUE(Data_Validation_2[Valid],-1))
 
Data_Validation_2[Valid] contains three values [6,7,8]
I have a slicer with Data_Validation_2[Valid] as the Field and 6 selected. 

If I directly use 6 in the command rather than selectedvalue I get a table that only has 6 in the Valid column. 
New Table = FILTER(Data_Validation_2,Data_Validation_2[Valid] = 6)
 
To prove to myself that I am not crazy I created a new measure and added it to a Card and got the expected result 6. 
New measure = SELECTEDVALUE(Data_Validation_2[Valid],-1)
 
Any help would be greatly appreciated,
Steven
 
1 REPLY 1
amitchandak
Super User
Super User

@Steven120 , You can not use the slicer/filter value in the calculated table.

 

Only Var Table  in a measure can use that

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.