cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dalacarelia_196
Level: Powered On

Select and show data between dates

I am trying to solve this , How many BB is in the table between the dates in the table Function and to show that in a textbox . and its not  working ... pls help 
 
Table name tblFunction
Logdates          Function
2018-01-01      BB
2018-01-01      BB
2018-01-02      BB
2018-01-02      AA
2018-01-03      AA
2018-01-03      BB
2018-01-03     BB
2018-01-04     AA
2018-01-04    AA
2018-01-04    BB
2018-01-04    BB
2018-01-05    AA

Datepcik_1 "2018-01-01 "
Datepick_2 "2018-01-04"
text( Sum(Filter(tblFunction, logdates > DatePick_1.SelectedDate, logdates < DatePick_2.SelectedDate), Function),BB ) )
2 ACCEPTED SOLUTIONS

Accepted Solutions
HadynM
Level 8

Re: Select and show data between dates

Hi @dalacarelia_196

 

CountIf, or CountRows depending on your requirements, are probably what you're after.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-counts

 

Something like:

CountIf(tblFunction, logdates >= DatePick_1.SelectedDate && logdates <= DatePick_2.SelectedDate && Function ="BB")

Hope that helps.

Hadyn

View solution in original post

tommyly
Level 8

Re: Select and show data between dates

You should be able to do either:

Text(
  Sum(tblFunction,
logdate > DatePick_1.SelectDate,
logdates < DatePick_2.SelectDate,
function = "BB"
) )

OR

Text(
  CountRows(
Filter(tblFunction,
logdate > DatePick_1.SelectDate,
logdates < DatePick_2.SelectDate,
function = "BB"
)
) )

You may want to make your boolean statement include equals, if you intend on considering dates that are equal as well.

View solution in original post

4 REPLIES 4
HadynM
Level 8

Re: Select and show data between dates

Hi @dalacarelia_196

 

CountIf, or CountRows depending on your requirements, are probably what you're after.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-counts

 

Something like:

CountIf(tblFunction, logdates >= DatePick_1.SelectedDate && logdates <= DatePick_2.SelectedDate && Function ="BB")

Hope that helps.

Hadyn

View solution in original post

tommyly
Level 8

Re: Select and show data between dates

You should be able to do either:

Text(
  Sum(tblFunction,
logdate > DatePick_1.SelectDate,
logdates < DatePick_2.SelectDate,
function = "BB"
) )

OR

Text(
  CountRows(
Filter(tblFunction,
logdate > DatePick_1.SelectDate,
logdates < DatePick_2.SelectDate,
function = "BB"
)
) )

You may want to make your boolean statement include equals, if you intend on considering dates that are equal as well.

View solution in original post

Community Support Team
Community Support Team

Re: Select and show data between dates

HI @dalacarelia_196,

Do you want to count the records that were in between the dates and contained “BB?

 

I made a test .

I created a SP list named “test2.

4.PNG

2.PNG

Set the Text property of label1 to:

CountIf(test2,Logdates>=DatePicker1.SelectedDate&&Logdates<=DatePicker2.SelectedDate&&Function="BB")

 

Also, you can Set the Text property of label1 to:

CountRows(Filter(test2,Logdates>=DatePicker1.SelectedDate,Logdates<=DatePicker2.SelectedDate,Function="BB"))

 

Regards,

eason

 

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dalacarelia_196
Level: Powered On

Iam so happy this working out fine. :)

Jippeeee thanx

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,821)