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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jlrubio
Frequent Visitor

Returning 3rd and 4th Wednesday of the month

Hello,

 

I am not sure whether I am posting this question in the correct area, but is there anyone who can assist me  in creating a function as a filter that will give me data for the 3rd and 4th Wednesday of the month?

10 REPLIES 10
Anonymous
Not applicable

Can you please clarify what you mean by "creating a function as a filter that will give me data for the 3rd and 4th Wednesday of the month"?

What do you mean? I have no idea whether you're talking about DAX or Power Query... and what does it mean "give me data for the 3rd and 4th Wed"?

I'd suggest reading this: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Best
Darek

I am trying to find a way to return the third and fourth Wednesday's of the month from appointment dates ranging from June 1, 2019 thru Aug 3, 2019. There is a column in my data set that has all of the appointments and from this column, I would like to populate only the third and fourth Wednesday's of the month. Is there a way I can do this? My apologies for the confusion!

Anonymous
Not applicable

Looks like what you need is a column in your table that will mark somehow (maybe TRUE/FALSE, or 3/4) the 3rd and 4th Wed in each month. Does the column with dates store all contiguous dates in the years you're interested in? In other words, is this a Date table? Or it's just a column with some dates?

Best
Darek

Hello Darek,

 

Yes, this is exactly what I need! The column with dates are appointment dates that range from June 1, 2019  thru August 3, 2019. This is a column with dates and not a date table. Is there anyway you can help me with this if possible?

 

Thank you,

Josefina Rubio

Anonymous
Not applicable

Here's the file with the M code:

 

Example file with how to mark the 3rd and 4th Wednesday

 

You have to take a look at the M code in Power Query, not at the table in the report.

 

Best

Darek

Hi Darek,

 

Thank you so much for all the help! I really appreciate the clarification, especially with looking at the M code in Power Query versus the data table. This definitely helps!

 

-Josefina Rubio

Anonymous
Not applicable

First of all, you should always, ALWAYS without exception, use Date tables that join to your date fields in other tables and you should hide the column to which you join in the tables leaving only the fields in the real Date table visible. You should (almost) never, EVER use a date column from any table apart from a proper Date table.

All time calculations must be done on the Date table. ALL. Otherwise you're very much at risk of getting into trouble.

Secondly, I'll create a Power Query script that will mark the 3th and 4th Wed in each month... and paste it in here.

Best
Darek
Greg_Deckler
Super User
Super User

Probably, I just answered a question regarding filtering out alternative Thursdays. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hello,

 

Is there anyway you can assist me with the dax function for the 3rd and 4th Wednesday's of the month?

 

Thank you,

Josefina Rubio

Hi Greg,

 

Thank you so much. Is there anyway you can send me a link to the post regarding the alternative Thursdays?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors