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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Newby needs some advic...
Power Apps
Answered

Newby needs some advice on pulling data from SQL Server

(0) ShareShare
ReportReport
Posted on by 5

Hello, I'm writing an app that will pull some agile development metrics from a SQL Server and display them.  Ideally, I would like to build in the ability to add metrics through the app.

 

My data set in SQL Server has a row per week.  Each row has the year, month, and a date that represents the cut-off date for measuring the statistics that week.  I've built the app so you can choose a month and a year from drop down boxes, then another drop down will populate with the individual weeks from that year/month combo to view stats.  I'm good up to this part.

 

What I'd like to do next is to display the statistics for the week that a person chooses.  I'm using text boxes for this but am open to suggestion because I suspect this is not the best approach.  Right now I accomplish this by using this code for the Default property of my text box:


First(Filter('[test].[Team_Health_Velocity]', DateValue(WeekEndingDate.Selected.Value) = WeekEndDate)).Velocity

 

In short, taking the date value the user selects from the drop down, finding the row in the database that corresponds to that date, then pulling back the Velocity metric.  No warnings or errors, but no values being populated.

 

Picture attached to better illustrate what I'm up to:

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @daviddvorak,

    Could you please share a screenshot about your app's configuration?

    Could you please share a bit more about the WeekEndingDate within the formula that you mentioned?

    Please check if the Date format the DateValue function (within your formula) returned is the same as the WeekEndDate column within your SQL table.

    In addition, please also take a try with the following formula:

    First(
    Filter(
    '[test].[Team_Health_Velocity]',
    Text(DateValue(WeekEndingDate.Selected.Value),"mm/dd/yyyy")= Text(WeekEndDate,"mm/dd/yyyy")
    )
    ).Velocity

    then check if the issue is solved.

    More details about the Text function within PowerApps, please check the following article:

    Text function

     

    Best regards,

    Kris

     

  • daviddvorak Profile Picture
    5 on at

    Yes that worked, thank you!  Makes sense to try to normalize them explicitly to the same date format via the Text function.  I still get a delegation warning, but I get the desired result and am not too concerned about efficiency.  Thanks!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 514

#2
WarrenBelz Profile Picture

WarrenBelz 419 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 295

Last 30 days Overall leaderboard