cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
avkn4462 Frequent Visitor
Frequent Visitor

Date Parameter comparison with existing Date column

Hi, 

I have an issue with comparing input date parameter with existing date column.

Suppose,

 If  DueDate > Dateparameter then "Not Due " 

If  DueDate = Dateparameter  then "Due " 

If  DueDate < Dateparameter then "Over Due ".

 

If I pass the given date parameter 

 If dateparameter is 10/5/2017

 

              

After passing the date parameter getting below result :                 

duedatecolumn   Parameter   Status

26/10/2017                              Notdue

25/10/2017                              Notdue

10/5/2017            10/5/2017     Due

10/4/2017                                 Not Due

10/3/2017                                 Not Due

10/2/2017                                    NotDue

 

But Expecting the below result :

duedatecolumn   Parameter   Status

26/10/2017          10/5/2017    Notdue

25/10/2017          10/5/2017    Notdue

10/5/2017            10/5/2017     Due

10/4/2017           10/5/2017       Over Due

10/3/2017           10/5/2017       Over Due

10/2/2017            10/5/2017       OverDue

 

Based on the given parameter I should get the Status of Due, OverDue and NotDue,

But I am only getting the expected result when  the parameter is equal to duedate.

 

Would Appreciate any help to solve the issue.

Thanks in Advance.

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
spuder Member
Member

Re: Date Parameter comparison with existing Date column

Hi @avkn4462

 

I tried it in Power Query and it worked.

 

Try the settings as bellow

 

example.jpg

View solution in original post

v-yulgu-msft Super Contributor
Super Contributor

Re: Date Parameter comparison with existing Date column

Hi @avkn4462,

 

In my test, I could get desired Status for each duedatecolumn value. 

 

In your scenario, please check whether the date format stored in duedatecolumn is the same as parameter date. And make sure the data type of duedatecolumn and parameter are both set to date. Also, what is the regional setting in your .pbix file, is it the same as where you stored source data (duedatecolumn).

1.PNG

 

Since I could not reproduce your issue, it would better you can share your pbix file for further analysis.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
spuder Member
Member

Re: Date Parameter comparison with existing Date column

Hi @avkn4462

 

I tried it in Power Query and it worked.

 

Try the settings as bellow

 

example.jpg

View solution in original post

v-yulgu-msft Super Contributor
Super Contributor

Re: Date Parameter comparison with existing Date column

Hi @avkn4462,

 

In my test, I could get desired Status for each duedatecolumn value. 

 

In your scenario, please check whether the date format stored in duedatecolumn is the same as parameter date. And make sure the data type of duedatecolumn and parameter are both set to date. Also, what is the regional setting in your .pbix file, is it the same as where you stored source data (duedatecolumn).

1.PNG

 

Since I could not reproduce your issue, it would better you can share your pbix file for further analysis.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
avkn4462 Frequent Visitor
Frequent Visitor

Re: Date Parameter comparison with existing Date column

Hi @spuder,

 

Thank you for solution.

 

It is working.

avkn4462 Frequent Visitor
Frequent Visitor

Re: Date Parameter comparison with existing Date column

Hi @v-yulgu-msft,

 

Thank you for solution.

 

It is working now.

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 230 members 2,283 guests
Please welcome our newest community members: