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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Filter depending on values

Hi guys:

I have accounting periods with date/time format. When the period is closed the format is "dd/mm/yyyy hh:ss" with the last day, for example "31/10/2020 12:00" and when we need to add some info after this, we add a row with the same date, but 1 am, continuing with the same example "31/10/2020 01:00".

So, what I need in Power BI is put a filter that gives me 2 options "A" and "B",
A: allows me to have all the periods with the 12:00 and excluiding the ones with 1:00.

B: use the period when it have the 01:00 excluding the periods with 12:00, but when the period does not have 01:00 let the period with 12:00.

Something like this:

TableFilter AFilter B
31/01/2020 12:0031/01/2020 12:0031/01/2020 01:00
31/01/2020 01:0028/02/2020 12:0028/02/2020 12:00
28/02/2020 12:0031/03/2020 12:0031/03/2020 12:00
31/03/2020 12:0030/04/2020 12:0030/04/2020 01:00
30/04/2020 12:00  
30/04/2020 01:00  

 

Regards 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Is this what you want? Please download the PBIX file for details. Let me know if you have any questions.

012006.jpg

 

Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

View solution in original post

5 REPLIES 5
v-jingzhang
Community Support
Community Support

Hi @Anonymous ,

 

Has this problem been solved? If so, kindly Accept the appropriate reply as the solution or post your own solution. People having similar questions will find it quickly. If not solved, share more info about how it is going now. Thanks.


Regards,
Jing

Anonymous
Not applicable

the answer was great, I´ve already accepted as a solution.

Regards

v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Is this what you want? Please download the PBIX file for details. Let me know if you have any questions.

012006.jpg

 

Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

amitchandak
Super User
Super User

@Anonymous , Not ver clear but column like

if([datetime].time = time(0,0,0) , [datetime], blank())

 

or

 

if([datetime].time = time(1,0,0) , [datetime], blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi, thank you for your help. I am so sorry that I did not explain correctly.

I think that I need a measure, because I need the filter result on this table (let me paste it again, cause I see that the columns are so close):

EXCEL_H2eVyjPKZp.png

 

My dates will be every final date of each month, plus the "12:00". In some cases I will have this date + "12:00" and, also, the same final date of the month, plus 1:00.

I need in this filter option A and option B. When A is selected I should have all the dates rows with the "12:00", but when I have the B filter, I should have only all the dates with "12:00" BUT in the cases when I have the same 2 dates (one with "12:00" and the other with "1:00"), excludes the one with "12:00", and shows the date with "1:00" and the dates that just have "12:00" show them to. 

That is why, in my table example, the A have just dates with "12:00" and in B I have a mix of "12:00" and "1:00".

 

I hope I have explained myself better

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors