Forum Discussion
How to create a histogram with data series coming from different tables
Hi all!
In Power BI, I need to create a histogram using data from one table, then add dots (i.e., a series) from another table and color them differently based on specific logic. Is it possible to do this in Power BI?
Thanks
Hi Fern_21 ,
The standard Histogram visual cannot do this. You need to "fake" it using a Line and Clustered Column Chart.
Here is the quick recipe:
Shared Axis: Ensure both your Histogram data (Table A) and Series data (Table B) share a common "Bin" or "Range" column for the X-Axis.
Visual Type: Use Line and Clustered Column Chart.
Column Y-Axis: Put your Histogram count here.
Line Y-Axis: Put your Series data here.
The "Ghost Line" Trick:
Go to Format > Lines -> Set Stroke Width to 0 px (hides the line).
Go to Format > Markers -> Turn On (shows the dots).
Conditional Colors:
Since you can't easily conditionally format line markers, create separate measures for each color logic (e.g., [Green Dots Measure] and [Red Dots Measure]) and add them as separate lines.
This gives you bars for the histogram and floating dots for your data series on the same chart.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.
5 Replies
- burakkaragoz
Super User
Hi Fern_21 ,
The standard Histogram visual cannot do this. You need to "fake" it using a Line and Clustered Column Chart.
Here is the quick recipe:
Shared Axis: Ensure both your Histogram data (Table A) and Series data (Table B) share a common "Bin" or "Range" column for the X-Axis.
Visual Type: Use Line and Clustered Column Chart.
Column Y-Axis: Put your Histogram count here.
Line Y-Axis: Put your Series data here.
The "Ghost Line" Trick:
Go to Format > Lines -> Set Stroke Width to 0 px (hides the line).
Go to Format > Markers -> Turn On (shows the dots).
Conditional Colors:
Since you can't easily conditionally format line markers, create separate measures for each color logic (e.g., [Green Dots Measure] and [Red Dots Measure]) and add them as separate lines.
This gives you bars for the histogram and floating dots for your data series on the same chart.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes. - FBergamaschi
Super User
Hi Fern_21,
yes it is possible
You need to have a relationship between these two tables and use conditional formatting on the measure you will create to make the calculation of your interest
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- cengizhanarslan
Super User
You can achieve this using the Line and Clustered Column Chart. In this visual, the columns can represent your histogram (using bins from the first table), while the line can represent the values from the second table within the same context.
If your data comes from two different fact tables, make sure you use a proper dimension table (for example, a shared date or numeric dimension) so both facts relate correctly in a star schema.
If you specifically want the second series to appear as dots, you can format the "Line" by setting "Lines → Line → Line style → Dotted" and "Lines → Line → Interpolation type → Step". This gives a dot-like effect while keeping everything in one visual.
- AnonymousNot applicable
Hi Fern_21 ,
Thank you for reaching out to the Microsoft Fabric Community Forum. Thank you cengizhanarslan , FBergamaschi and burakkaragoz for your response.
Could you please let us know if the issue has been resolved? I wanted to check if you had the opportunity to review the information provided. If you still require support, please let us know, we are happy to assist you.
Thank you.
- AnonymousNot applicable
Hi Fern_21 ,
We haven’t received an update from you in some time. Could you please let us know if the issue has been resolved?
If you still require support, please let us know, we are happy to assist you.Thank you.