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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
game1
Helper III
Helper III

Filter dates for the 7 last days with specific criteria

Hello, 

 

Can somebody help me with this problem? 

I want to count the number of persons per day, but only for the last 7 days. 

For dates that do not appear in the table, the values ​​will be set to 0. But, I only want that for the last 7 days.

So, for today, it must be in the axis X: from 19/02/2024 to 25/02/2024(Today).

So, I don't want the other dates to appear. 

Thanks!

Capture d’écran, le 2024-02-26 à 03.29.31.png

1 ACCEPTED SOLUTION
timalbers
Super User
Super User

Hi @game1 
try this for RETURN:  IF( Last7DaysCount > 0, Last7DaysCount, BLANK() )

 

If you don't want a value to appear, it has to be blank, rather than 0.


—————————————————————————————
✔️ If my answer helped you, please consider marking it as a solution.

View solution in original post

1 REPLY 1
timalbers
Super User
Super User

Hi @game1 
try this for RETURN:  IF( Last7DaysCount > 0, Last7DaysCount, BLANK() )

 

If you don't want a value to appear, it has to be blank, rather than 0.


—————————————————————————————
✔️ If my answer helped you, please consider marking it as a solution.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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