web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Building Power App_Req...
Power Apps
Unanswered

Building Power App_Request help to load data from choice columns. Incompatile Tables vs Text

(1) ShareShare
ReportReport
Posted on by 16

As you see in sharepoint list, i have columns say ' Tire Condition'. It is a choice column and values are Ok or Not Ok. I want to show count of Ok and count of not ok in a gallery.  I created a collection in 'On Start' to get Ok values but it keeps giving error. Answer should have been 3 for Ok count.

 

List 

deepaksharma_0_1-1721005521861.png

Code in On Start of App- showing collection has all inspection data from above sharepoint list

deepaksharma_0_2-1721005592611.png

 

Code in On Start of App which has Errors. I tried with and without .Value but error does not go away on signs

 

deepaksharma_0_0-1721005476199.png

deepaksharma_0_3-1721005749301.png

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,721 Most Valuable Professional on at

    Hi @deepaksharma_0 ,

    Can you please remember to post your code in Text as it saves re-typing here. The first error is because you have single quotes ' around ok instead of double quotes " on the first line. 

    WarrenBelz_0-1721011869541.png

    Apart from that, what type of fields are all those patched to for the Choice examples, are they single or multiple value ?? 

  • deepaksharma_0 Profile Picture
    16 on at

    Ok. Code is below. Choice column 'Tire Condition' accepts single value. But few fields accept multiple values

    ClearCollect(
        ColInspectionData,
        'DailyForklift/OrderPickerInspectionReport'
    );

    ClearCollect(
        ColOkCounts,
        {
            TireCondition: CountIf(ColInspectionData, TireCondition.Value = "Ok"),
            HeadLights: CountIf(ColInspectionData, HeadLights.Value =  "Ok"),
            WarmingLights: CountIf(ColInspectionData, 'Warming Lights'.Value = "Ok"),
            HourMeter: CountIf(ColInspectionData, 'Hour Meter'.Value = "Ok"),
            Horn: CountIf(ColInspectionData, Horn.Value = "Ok"),
            AnyLeaks: CountIf(ColInspectionData, 'Any Leaks'.Value = "Ok"),
            Steering: CountIf(ColInspectionData, Steering.Value = "Ok"),
            ServiceBrake: CountIf(ColInspectionData, 'Service Brake'.Value = "Ok"),
            ParkingBrake: CountIf(ColInspectionData, 'Parking Brake'.Value = "Ok"),
            MastCondition: CountIf(ColInspectionData, 'Mast Condition'.Value = "Ok")
           
        }
    );
  • WarrenBelz Profile Picture
    153,721 Most Valuable Professional on at

    @deepaksharma_0 ,

    The issue will be with the multi-value fields - example using HourMeter

     HourMeter: CountIf(ColInspectionData, "Ok" in 'Hour Meter'.Value),

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 372 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 303 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 238 Super User 2026 Season 1

Last 30 days Overall leaderboard