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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
hs248
New Member

Show two histograms with different filters in the same visual

Hello,

 I have a table with one column "measurement" (with values A, B, C or D) and one column "value" (numeric). On my report page I have two identical slicers on the "measurement" column.

What I would like is two (binned) frequency distributions in the same visual, one each for the measurement value selected in each slicer. So the user should be able to select e.g. B in one slicer and D in the other and then compare the two frequency distributions in the visual.

Is this possible with a regular histogram visual? If yes, how would I set its filters?

Thanks in advance for any help!

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @hs248 

 

What is that regular histogram visual? There isn't one that is native. If it is a custom one, I would get in touch with the developer. Alternatively, as what others have suggested, use the cluster column chart. Attached is a sample pbix that uses that visual and bins the values dynamically.

danextian_0-1742097844074.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

5 REPLIES 5
hs248
New Member

@Deku You are right, a single slicer does the same job. Only in my particular case I have two slicers anyway. I need them to control other visuals on the report page independently of each other.

@danextian The histogram visual I was using was free and by Microsoft, but it seems now that it isn't available anymore. So I'll do dynamic binning along the lines of the pbix file you provided. Only I want to specify the number of bins instead of their size, but I'll get along from here onwards by myself.

Thanks for the contributions!

danextian
Super User
Super User

Hi @hs248 

 

What is that regular histogram visual? There isn't one that is native. If it is a custom one, I would get in touch with the developer. Alternatively, as what others have suggested, use the cluster column chart. Attached is a sample pbix that uses that visual and bins the values dynamically.

danextian_0-1742097844074.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Deku
Community Champion
Community Champion

Why not have a single single slicer.

You could use a cluster bar chart with measurement in the legend. This will show any number of histograms in the same visual. Alternatively you could use small mutliples.

If really want to use two slicers you will need to add another table, that is a distinct list of measurement and use TREATAS in a second measure. This is because both slicers would have to apply to the chart, and they would not be additive.


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
hs248
New Member

 

Hi  lbendlin, thanks for looking into this and sorry for the incomplete question. Here's a reduced version of what my table looks like:

 

MeasurementValue
A1
A2
A2.5
B0.5
B1.5
B2
C1.5
C2
D0.5
D1.5
D2
D2

 

Now I have slicer1 and slicer2 on my report page, both filtering the "Measurement" column. Suppose the user chooses B in slicer1 and C in slicer2, I want the histogram to look something like

 

hs248_0-1742072191758.png

 

If the user chooses C in slicer1 and D in slicer2, the visual shall look like

 

hs248_1-1742072292224.png

 

I created these example diagrams with fixed segmentation of the x axis (2 bins: 0 to 1 and 1 to 2), but I actually need a dynamic segmentation that adapts to the data. So I think I need a histogram visual.

 

Does this make sense? If it doesn't, feel free to ask for more explanations.

 

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors