This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi there,
I have a date column that shows dates for current year (01/01/2019-12/31/2019). And i would like to create a calculated column called "IsCurrentorPastMonth?" and will have a value of Y or N. Would anyone know what the calculated column would look like?
Sample:
Dates IsCurrentorPastMonth?
01/02/2019 Y
07/02/2019 Y
10/01/2019 Y
11/03/2019 N
12/02/2019 N
Your help is greatly appreciated!
Thank you
Glen
Solved! Go to Solution.
Hi @gco ,
Here is the input form for the conditional column.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Proud to be a Super User!
Hi @gco ,
Current to today?
Nathaniel
Proud to be a Super User!
Hi @gco
Doing this in Power Query is more efficient. Matches your post.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
= Table.AddColumn(#"Changed Type1", "CurrentDate", each if Date.Month([#"Dates IsCurrentorPastMonth?.1"]) <= Date.Month(DateTime.LocalNow()) then "Y" else "N")
Proud to be a Super User!
Just tried it with 10/31 and it works. Good point.
Proud to be a Super User!
hey @Nathaniel_C ,
That is pretty quick. I am pretty noob. can you please tell me how to do this? i am used to right-clicking an existing table and then entering the DAX.
Hi @gco ,
Here is the input form for the conditional column.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Proud to be a Super User!
@gco ,
You are welcome! @MattAllington book Supercharge Power BI is a great place to start. And remember, I get paid by Kudos...the thumbs up.
Cheers,
Proud to be a Super User!
it looks like i can't on the past posts. I just did it on this new one. Thanks again!
how come i could not click on the thumbs up anymore? i get a stop icon when i hover my mouse to it.
Hi Nathaniel,
yes, it will be for current month. So like 10/31 would be Y
Thank you
Glen
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.