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
BCLS776
Community Champion
Community Champion

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.

View solution in original post

4 REPLIES 4
BCLS776
Community Champion
Community Champion

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)

‘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.

BCLS776
Community Champion
Community Champion

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.

View solution in original post

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

Thanks

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,319)