Solved

MS Excel 2013  - PowerPivot - DAX  How to compare today's date to another dates

Posted on 2014-07-27
2
703 Views
Last Modified: 2014-07-28
Hi All,
I have records in 3 tables of student and course

CourseID coursename   startdate                   enddate
   1             maths             06/26/2014               07/27/2014

 CourseStudentAssignment

CourseId   studentId     CourseStatus (computed column)
  1                 1  

I want to create a formula which checks the  startdate and enddate comparing to today's date

for eg :  If( Today'sdate > StartDate and today'sdate < endDate then CourseStatus = "On-going Course")
              if (Todays'Date < startDate then CourseStatus = "Not Started but student enrolled")
             If (Today'sDate > enddate then courseStatus  "Course completed")

please can you write down how to compare the above date to today's date.
0
Comment
Question by:BI 0824
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 40223873
Assuming you have the relationships set up between the tables, it would be something like:

=if(TODAY()>=related(Course[startdate]),if(today()<=related(Course[enddate]),"On-going Course","Course completed"),"Not Started but student enrolled")
0
 

Author Comment

by:BI 0824
ID: 40225795
Thanks Rory. Appreciate that. I also posted another question in same section.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question