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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Cobra77
Post Patron
Post Patron

How hide a graph if selected month no data , and display data over multiple if the month has data

Hi,

 

How hide a graph if selected month no data , and display data over multiple if the month has data.

 

In this example i have data from june to august.

If I choose June, July or August we want to see the graph on every month.

If I choose months after September, we want to either hide the graph or return blank.

 

For the test with no data , it seems to work :

test_0.jpg

but with the data test if I choose the month I only have the selected month.

If I remove the data test I have for the 3 months on the small graph at the bottom righttest_1.jpg

 

And am I obliged to have 2 tables of dates to realize this graph?

(the one that serves as a filter, and the one to display the months in the graph)

 

Thanks a lot for your help.

 

2 REPLIES 2
Anonymous
Not applicable

@Cobra77 

My suggestion is use month number instead month text, and for the measures you can use if to set the condition, something like:

 

If(selectedvalue([month number])< 9, [Sales sum allcalendar], [Test_data])

 

Share your test pbix if not clear. 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

hi @Anonymous 

 

We cant use month month number in the slicer.

in the real application these are periods, example "from March 1 to March 20".

 

and it is necessary to test first if there are values on the selected period.

and everything must be dynamic of course.

 

I share with you the test pbix for this scenario :

https://1drv.ms/u/s!AmluE3Tt6h4WgjSPAvhPJ5kOIhXm?e=q5o9nw

 

Thanks

 

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.