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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RJ1993
Frequent Visitor

Conditionally (item selected/filtered) show data in clustered chart

Hi everyone,

I have the following question:

  • How can you conditionally show data in a 'clustered colum chart' whenever a certain item is highlighted/filtered?

 

I have the following set-up:

Data

  • A table (Table) with 3 columns: respondentId, Question, Answer (long format)
  • Two measures: checkFiltered and TotalCountConditionally

The table (named 'Table') looks like this:

RespondentIdQuestionAnswer
1A1
1B2
1C3
2A2
2B3
2C1
.........

 

The two measures are calculated as follows:

 

 

 

 

 

CheckFiltered = IF(ISFILTERED('Table'), TRUE(), FALSE())
TotalCountConditionally = 
VAR Data = CALCULATE(COUNTA('Table'[Answer])) 
VAR Check = [CheckFiltered] 
RETURN IF(Check = TRUE(), Data, BLANK()) 

 

 

 

 

 

These measures were perfectly in a table. As soon as I click a specific question (A, B or C), the filtered data gives me the distribution of the answers (e.g., how many times did A get a number 1, a number 2, ...). The same thing whenever I don't select anything.

 

- No item selected: 

b5V7orC

 

Item selected:

w1Sdd88

 

However, when using the data in a chart, the data never gets shown at all. No matter when I select something or not, the clustered chart won't show the data (despite the fact that, whenever I click on 'Show data as table', it does reveal the correct data).

 

My clustered chart is set-up like this:

  • Axis: Answer
  • Values: TotalCountConditionally

     

RJ1993_0-1622808160306.png

 

I hope someone can help me out with this.  I've attached the file so people might have a look at it. It only contains dummy data

- PowerBI file: https://easyupload.io/15p2kn

 

Kind regards,

RJ

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Hi @RJ1993 Steps:
Click on Format tab, click on Edit Interactions - make sure to turn this off afterwards-select table in upper left, then go down to your graph, and click on the Filter icon in the upper left corner of the graph.  Then it works!
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Nathaniel_C
Super User
Super User

Hi @RJ1993 , if I understand what you are trying to do:
Capture225.PNG

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @RJ1993 Steps:
Click on Format tab, click on Edit Interactions - make sure to turn this off afterwards-select table in upper left, then go down to your graph, and click on the Filter icon in the upper left corner of the graph.  Then it works!
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @Nathaniel_C ,

 

Thanks for the quick response! This works perfectly. 

 

Kind regards,

RJ1993

Hi @RJ1993 , you are welcome!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors