Monday, November 7, 2022

How to get Quarters from Date in Canvas PowerApps

Introduction

In this Blog we will see how to get Quarters from Date in Canvas PowerApps


Implementation Steps:

 

1. Navigate to https://make.powerapps.com

 

1.jpg

 

2. Select Apps --> Select New App --> Select Canvas

 

3. Once Page Opened Input the name and Select Tablet or Phone depends on your requirement, from my end am selecting Tablet Mode

 

2.jpg

 

4. Once Page Get Opened  --> Add a Label by Selecting (Insert --> Label) and Add a Button as Well

 

3.jpg

 

5. Now Select the Button and go to OnSelect and Write below code Logic

 

4.jpg

 

Code For Converting Date to Quarter

If(
    Month(Now())<=3,
        Set(getQuarterFromDate,"1"),
    Month(Now())>=04 && Month(Now())<=06,
        Set(getQuarterFromDate,"2"),
    Month(Now())>=07 && Month(Now())<=09,
        Set(getQuarterFromDate,"3"),
    Month(Now())>=10,
        Set(getQuarterFromDate,"4")
)

6. Now Set the Default Value to getQuarterFromDate

5.jpg

 

7. Now Click on the Button

 

 

You will see the Current Quarter Value there.

 

That's it :slightly_smiling_face:

No comments:

Post a Comment

How to Run Microsoft Flow for Every one Month

Introduction: In this Blog we will see how to Run Microsoft Flow for Every one Month. Implementation Steps:   1. Navigate to  https://make.p...