0
votes

I have a requirement where I need to create the Pie Chart for all available EventTypes. For example I have following EventTypes available in my system.

  1. Buy
  2. Sell
  3. Hold
  4. Buy Back

Now if a company has only two types of EventTypes like "Buy" & "Sell" then Power Report should show only two charts and if another company has three EventTypes like "Buy", "Sell" & "Hold" then same Power BI report should show the three pie charts.

I have two approaches to achieve this.

Approach 1: Create pie chart for all possible EventTypes and show and hide the pie chart based on the EventTypes available for given company. So how I can show and hide the pie chart in this approach.

Approach 2: Thinking to create the pie chart on the fly (If possible in PowerBI) as I could have done many time in SSRS using list. If possible how can I do this?

1
That's not quite how PowerBI works. There are "bookmarks" and "buttons" which allow hiding visualisations since one of the recent updates, but I doubt you can do it dynamically/automatically.user5226582

1 Answers

1
votes

Approach 1 should work OK, I think.

Create a chart for each of the four EventType values and write measures or use filters such that the chart values return BLANK() for non-existing EventType values.