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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)