Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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

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 accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

5 REPLIES 5
Jihwan_Kim
Super User
Super User

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 accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


@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 

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 accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


@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

 

 

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 accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors