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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
marcelodiazm16
New Member

Filters with no data

Hello! I have a problem, i have two filters (month and year) and the data im working on starts from june 2023 until february 2024 (now), so i don't want to show, for example, the months with no data (because it will appear [blank] in the cards) when i select a year.
i mean, when i select 2023, i want to the other filter with the months to show me the only months with data. 

Please help me.

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @marcelodiazm16 

 

Unfortunately, it's not support to dynamically change the field of the filter.

But maybe you can try this:

I create a set of sample data:

vzhengdxumsft_0-1707293849128.png

It is easy to see that the value of Jan, Feb, Mar is empty.

Then Create a calculate column:

Month = IF(
        ISBLANK('Table'[value]),
        BLANK(),
        MONTH('Table'[date])
    )

Then create a Slicer:

vzhengdxumsft_2-1707294074387.png

The result is as follow:

vzhengdxumsft_3-1707294142673.png

 

Best Regards,

Zhengdong Xu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @marcelodiazm16 

 

Unfortunately, it's not support to dynamically change the field of the filter.

But maybe you can try this:

I create a set of sample data:

vzhengdxumsft_0-1707293849128.png

It is easy to see that the value of Jan, Feb, Mar is empty.

Then Create a calculate column:

Month = IF(
        ISBLANK('Table'[value]),
        BLANK(),
        MONTH('Table'[date])
    )

Then create a Slicer:

vzhengdxumsft_2-1707294074387.png

The result is as follow:

vzhengdxumsft_3-1707294142673.png

 

Best Regards,

Zhengdong Xu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

bhanu_gautam
Super User
Super User

@marcelodiazm16 , For this you can create new calculated column using below mentioned formula

 

FilteredMonths =
VAR SelectedYear = SELECTEDVALUE('YourDateTable'[Year])
RETURN
FILTER (
VALUES('YourDateTable'[Month]),
CALCULATE(
COUNTROWS('YourDataTable'),
'YourDateTable'[Year] = SelectedYear,
'YourDateTable'[Month] = 'YourDateTable'[Month]
) > 0
)

 

Please accept as solution and give kudos if it helps




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Mmmm it didn't work, it showed me (blank) in month options, but i know there is an easy way, i just don't remember 😞 Thank you though

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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 Solution Authors