cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
XDUKERMANX
Regular Visitor

Image visible if not working

Hi,

 

As quickly as someone here helped me (thanks @RandyHayes) I’ve hit another speed bump.

 

I’m creating a simple user feedback app to submit responses but I am now creating an app to filter and recall responses.

 

I’m using the following formula to pull the average score submitted and adjusting according to time scale. This timescale is today:

 

With({wSRM: Sort('SRM Results',ID,Descending)},Average(Filter(wSRM,'Received on'>= DateAdd(Today(), -0)),Score ) )

 

 

I now want to make an image visible is the value returned from the above formula is above 1.5

 

I have tried the below formula but keep getting an error of “Name isn’t valid. This identifier isn’t recognized.”

 

If('Average Score Today'.number >= 1.5, true, false)

 

I’ve searched high and low and 9 times out of 10 I can find wheat I’m looking for from other users posts but I’m close to pulling my hair out with this one.

 

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions

OK, try using 'Average Score Today'.Text to access the value shown in the text label. To have your If() statement work correctly with this label value, you may have to put it in a Value() function to ensure Power Apps reads it as a number and not as a string.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
BCLS776
Super User
Super User

The error is coming from: 'Average Score Today'.number

Can you tell us what that is in your app? If 'Average Score Today' is a column name, you'll need to identify which record from the column you want to use (e.g. with a LookUp(), First(), Last(), etc)

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

‘Average Score Today’ is a text label with the below formula inside:

 

With({wSRM: Sort('SRM Results',ID,Descending)},Average(Filter(wSRM,'Received on'>= DateAdd(Today(), -0)),Score ) )

 

that gives me the average of the ‘score’ column in my SharePoint list which is a number column. 

 

im trying to make the image visible if the ‘Average Score Today’ value returned by the formula is above 1.5 formula 

 

I hope I have included everything you have asked for.

OK, try using 'Average Score Today'.Text to access the value shown in the text label. To have your If() statement work correctly with this label value, you may have to put it in a Value() function to ensure Power Apps reads it as a number and not as a string.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

I used the if(Value( function and that made it work. 

Thanks

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,642)