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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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