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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

selectedvalue not returning all values

Hello Guys, 

my problem is, that measure selectedvalue does not show some values.

 

Measure 

CALCULATE (
  SELECTEDVALUE ( table1 [product] ) ,
       filter ( table1 , table1 [date] = MAX [date] ) )

Results are like this:
( i need to fill blank values in "product" , but measure does not work for all rows, which is strange, because in Data tables im sure, that i have product on ID 589 with that max_date ) 

IDmax_dateproduct
12313.3.2022MOTOR
58911.2.2022 
84225.2.2022COMP
5648.3.2022 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Not very clear

 

Try like

CALCULATE (
Max( table1 [product] ) ,
filter ( table1 , table1 [date] = MAX ([date] ) ))

 

or

 

CALCULATE (
Max( table1 [product] ) ,
filter ( allselected(table1) , [Id] = max(Table1[ID]) &&  table1 [date] = MAX ([date] ) ) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
AilleryO
Memorable Member
Memorable Member

Hi,

 

Are you sure not to have duplicates ?

SELECTEDVALUE returns only one value, if there are 2 or more values, then it return the aletrnate result.

Try fill in the 2nd argument of SELECTEDVALUE, the alternate result, to see if it is the case.

 

Let us know

amitchandak
Super User
Super User

@Anonymous , Not very clear

 

Try like

CALCULATE (
Max( table1 [product] ) ,
filter ( table1 , table1 [date] = MAX ([date] ) ))

 

or

 

CALCULATE (
Max( table1 [product] ) ,
filter ( allselected(table1) , [Id] = max(Table1[ID]) &&  table1 [date] = MAX ([date] ) ) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

second one worked, thank you very much

So I think that my guess was OK, you had duplicates ? and the MAX get rid of it ?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors