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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.