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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
nirman
Advocate II
Advocate II

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,

 

@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 AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.