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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

New column with dates after 1/9/2021

I am trying to create a new column that will just show me data from a date column if the date is greater than 1/9/2021. Please can you help me. Many thanks

1 ACCEPTED SOLUTION
jaipal
Resolver III
Resolver III

@Anonymous  in the power query, right click on date column and click on Date Filters-->After

you can manage the data by giving the Date

View solution in original post

5 REPLIES 5
TheoC
Super User
Super User

@Anonymous if you want all data to be removed entirely, then @jaipal has provided a good solution using Power Query.  If you want to keep all of your records and just have a column that contains dates which are greater than 1/9/2021, then you can create a Calculated Column that uses the below formula:

 

Calculated Column = 

SWITCH (
TRUE () ,
'Table'[Date] < DATE ( 2021 , 9 , 1 ) , 'Table'[Date] ,
BLANK()
        )
TheoC_0-1652328240740.png

 

Thanks,

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Anonymous
Not applicable

Thank you so much thats fab. I was also trying to get this to work with another collumn that counts the detentions only if they are after 1/9/2021 something like this..... however im not sure where i am going wrong.

collumn = If ('Detentions (2)'[after sept]>date(2021,09,01),'Detentions (2)'[Detention Date]),CALCULATE(SUM('Detentions (2)'[Payback]),ALLEXCEPT('Detentions (2)','Detentions (2)'[Adno]))+0 
The first section works ok similar to your solution to seperate just the dates after 01/09/2021. please would it be posible to help me with this too. Many thanks

Hi @Anonymous 

 

Add this part as its own measure: CALCULATE(SUM('Detentions (2)'[Payback]),ALLEXCEPT('Detentions (2)','Detentions (2)'[Adno]))+0 

 

Then just add the measure as the "else" in your if statement.

 

Hope that makes sense.

 

Theo

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Anonymous
Not applicable

Sorry im not sure where to put the ELSE, I have both of these collumns working ok on their own, but i want them to work together in one collumn?
Collumn name = If ('Detentions (2)'[after sept]>date(2021,09,01),'Detentions (2)'[Detention Date]) ELSE, CALCULATE(SUM('Detentions (2)'[Payback]),ALLEXCEPT('Detentions (2)','Detentions (2)'[Adno]))+0
 
 
jaipal
Resolver III
Resolver III

@Anonymous  in the power query, right click on date column and click on Date Filters-->After

you can manage the data by giving the Date

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.