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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
RasDev1
Frequent Visitor

I need to display last 30 days bar chart

Hi members , I am new to power pi ,
I need to display the last 30 days in the graph,
I added a filter to last 30 days,its work good
but the problem is when i search a previous months (example may month)it should be blank .
how to rectify the issue?
see images

RasDev1_0-1729146859144.png

 

RasDev1_0-1729148368509.png

 

 

1 ACCEPTED SOLUTION
uzuntasgokberk
Super User
Super User

Hello @RasDev1,

You can create a measure:
test=

VAR x_=
    CALCULATE(
        MAX('your table'[_Date]),
        REMOVEFILTERS('yourtable'[Date])
    )
RETURN

IF(
    SELECTEDVALUE('yourtable'[Date]) >= x_ -30,
    1,
    0)

And make it filter in filter pane as 1. İt is working sync with your filter.
uzuntasgokberk_0-1729160934878.png

 

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

View solution in original post

3 REPLIES 3
uzuntasgokberk
Super User
Super User

Hello @RasDev1,

You can create a measure:
test=

VAR x_=
    CALCULATE(
        MAX('your table'[_Date]),
        REMOVEFILTERS('yourtable'[Date])
    )
RETURN

IF(
    SELECTEDVALUE('yourtable'[Date]) >= x_ -30,
    1,
    0)

And make it filter in filter pane as 1. İt is working sync with your filter.
uzuntasgokberk_0-1729160934878.png

 

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

Kedar_Pande
Super User
Super User

Create a Measure

ShowGraph = 
IF(
MAX('YourDateTable'[Date]) < TODAY() - 30,
0, // or BLANK()
1
)

Add the ShowGraph measure to your graph's filters area and set the filter to only show when ShowGraph equals 1.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

 

Same issue is repeat

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI 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.

Top Kudoed Authors