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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
nirman
Advocate IV
Advocate IV

Conditional visibility of a chart in Power BI report

I have created a report using Power BI desktop. The report is having two different charts.

 

Chart A is of "Clustured Column Chart", whereas the Chart AB is "Area chart". Both the charts are using the same Dataset.  Chart A is suppose to display some calculations for month-wise, whereas the chart B is suppose to display data based on the month selected in chart A. 

 

Now both the above charts are working correctly. The only problem is when nothing is selected in chart A, then the chart B displays analysis data for all months which I don't want to happen. I would rather want chart B to display blank when nothing is selected in chart A. Or may be hide chart B from the report and should be visible as soon as user selects something in chart A.

 

Could anyone please suggest, how can we set this kind of behavior in PowerBi reports?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Could chart B use a new calculated measure that sets its value to zero when more than one month is selected?

Something like:

NewMeasure:=IIF(count(months) > 1 , 0 , OldMeasure)

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Could chart B use a new calculated measure that sets its value to zero when more than one month is selected?

Something like:

NewMeasure:=IIF(count(months) > 1 , 0 , OldMeasure)

Anonymous
Not applicable

I do have same kind of requirement, but when I use I get below error message

 

Error Message:

MdxScript(Model) (1, 60) Calculation error in measure 'IM - Infy Data'[Action Test]: The function COUNT takes an argument that evaluates to numbers or dates and cannot work with values of type String.

 

What would be the solution for that.

 

Thanks,

 

Mi2n
Microsoft Employee
Microsoft Employee

@Anonymous, you will have to use COUNTA() instead of COUNT() for strings.

Anonymous
Not applicable

Actually the logic here is that, when we select single list of value from Chart A, then my second chart has to display selected data value.

 

but somehow my out is coming zero for single selection and more selections.

 

not sure where is the wrong in this formula.

 

Thanks

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 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.