cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Power_MN
Helper I
Helper I

Ceck if calculated Date is a holiday

Hello everyone, can someone please help me with my problem: I'm calculating a date (measure). Now I want to check whether the date appears in another table (I have listed all holidays-dates in this table). How can I do this? Thank you for your help! Kinds regards Michael
1 ACCEPTED SOLUTION
Jihwan_Kim
Community Champion
Community Champion

Hi, @Power_MN 

Please check the below picture and the pbix file's link down below.

 

Picture7.png

 

Holiday or not =
IF (
DATE ( YEAR ( [Forecast next Order Date] ), MONTH ( [Forecast next Order Date] ), DAY ( [Forecast next Order Date] ) )
IN ALLSELECTED ( Holidays[Holidays] ),
"Holiday",
"Not Holiday"
)

 

https://www.dropbox.com/s/xgf8cztetxl562t/Sample.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Best regards, JiHwan Kim


Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

View solution in original post

5 REPLIES 5
Jihwan_Kim
Community Champion
Community Champion

Hi, @Power_MN 

Please check the below picture and the sample pbix file's link down below.

 

Picture3.png

 

Is Holiday =
IF (
SELECTEDVALUE ( Dates[Date] ) IN ALLSELECTED ( Holidays[Holiday] ),
"Holiday",
""
)

 

https://www.dropbox.com/s/fs11jd0kcpd52ad/powermn.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Best regards, JiHwan Kim


Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

@Jihwan_Kim thank you for your answer.


Maybe I don't formulate it right.

 

My "Date" is a measure (not a column). This calculated Date should be checked. If the calculated Date is also in the table "Holiday", the measure should return "Holiday".

 

Thank you

 

Kind regards 

Michael 

Jihwan_Kim
Community Champion
Community Champion

Hi, @Power_MN 

Thank you for your feedback.

If it is OK with you, please share your sample pbix file's link here. It will help me a lot to make less confusion.

Thank you.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Best regards, JiHwan Kim


Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

@Jihwan_Kim 

the sample file can be open by using following OneDrive Link:

 

https://1drv.ms/u/s!Aosv7ECDrc5dtzH5Tu0IrWdeW4cU?e=4TXlfV

 

Thank you for your help!

 

Kind regards

 

 

Jihwan_Kim
Community Champion
Community Champion

Hi, @Power_MN 

Please check the below picture and the pbix file's link down below.

 

Picture7.png

 

Holiday or not =
IF (
DATE ( YEAR ( [Forecast next Order Date] ), MONTH ( [Forecast next Order Date] ), DAY ( [Forecast next Order Date] ) )
IN ALLSELECTED ( Holidays[Holidays] ),
"Holiday",
"Not Holiday"
)

 

https://www.dropbox.com/s/xgf8cztetxl562t/Sample.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Best regards, JiHwan Kim


Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors