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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
PBI5851
Helper V
Helper V

Bar chart showing in different lines rather than a single line

Hello,

I am trying to display a sum of calls on a graph but rather than summarizing it, the graph shows the data in two lines. please can you tell me how to get the data as a single line of 6 and change accordingly when i move the slicer. 

 

Raw data 

StudentidCreatedDateCallTypeCountofContacts
AB12301/08/25Direct4
AB12312/24/24Direct3
AB12312/20/24Direct3
AB12312/16/24Direct3
AB12301/02/25Direct2
AB12301/13/25Internet Search1
AB12307/18/24Indirect1
AB12311/25/24Direct1
AB12307/18/24Direct1
AB12307/15/24Direct1
AB12308/07/24Direct1

 

This is my setup, 

PBI5851_0-1745922759497.png

since its the X axis, its showing the different values, is it possible to show a single value of 6 rather than 4 and 2. So, if I change the date range to 11/22/24 to 1/31/25, the count is 16 , but i get 4 bars. 

 

Thank you. 

2 ACCEPTED SOLUTIONS
danextian
Super User
Super User

Hi @PBI5851 

I’m assuming you're referring to columns or bars, not lines. When you use the count as a dimension, the value is still being summarized but the summary is broken down by each unique count value. To address this, calculate the filtered sum of count per Account ID and store the result in a disconnected table that contains the possible count values.

 

Disconnected count table

Counts = 
GENERATESERIES ( 0, 100, 1 )

Measure

Count of Contacts Grouped = 
SUMX (
    FILTER (
        SUMMARIZECOLUMNS (
            'Table'[Studentid],
            "@count", CALCULATE ( SUM ( 'Table'[CountofContacts] ) )
        ),
        [@count] IN VALUES ( Counts[Value] )
    ),
    [@count]
)

Result

danextian_0-1745929236482.png

danextian_1-1745929280362.png

Please see the attached sample pbix.

 





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

V-yubandi-msft
Community Support
Community Support

Hi @PBI5851 ,

Thank you for your feedback. I noticed that the Y axis is currently displaying the count of contacts grouped by value instead of showing  1 per Student ID. This happens because Power BI automatically aggregates data based on the selected fields, leading to the count being split rather than maintaining a fixed value for each Student ID.

 

To better align with your requirement, i  can adjust the measure and visual settings so that the X axis correctly represents Student ID while ensuring the Y axis reflects the total count properly. Could you review the attached screenshot and let me know if this meets your expectations? If any further refinements are needed, please let me know.

FYI:

Vyubandimsft_0-1746213771844.png

 

Regrads,

Yugandhar.

View solution in original post

6 REPLIES 6
V-yubandi-msft
Community Support
Community Support

Hi @PBI5851 ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

 

Thank you.

V-yubandi-msft
Community Support
Community Support

Hi @PBI5851 ,

I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.

Thank you.

V-yubandi-msft
Community Support
Community Support

Hi @PBI5851 ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

Thank you.

V-yubandi-msft
Community Support
Community Support

Hi @PBI5851 ,

Thank you for your feedback. I noticed that the Y axis is currently displaying the count of contacts grouped by value instead of showing  1 per Student ID. This happens because Power BI automatically aggregates data based on the selected fields, leading to the count being split rather than maintaining a fixed value for each Student ID.

 

To better align with your requirement, i  can adjust the measure and visual settings so that the X axis correctly represents Student ID while ensuring the Y axis reflects the total count properly. Could you review the attached screenshot and let me know if this meets your expectations? If any further refinements are needed, please let me know.

FYI:

Vyubandimsft_0-1746213771844.png

 

Regrads,

Yugandhar.

danextian
Super User
Super User

Hi @PBI5851 

I’m assuming you're referring to columns or bars, not lines. When you use the count as a dimension, the value is still being summarized but the summary is broken down by each unique count value. To address this, calculate the filtered sum of count per Account ID and store the result in a disconnected table that contains the possible count values.

 

Disconnected count table

Counts = 
GENERATESERIES ( 0, 100, 1 )

Measure

Count of Contacts Grouped = 
SUMX (
    FILTER (
        SUMMARIZECOLUMNS (
            'Table'[Studentid],
            "@count", CALCULATE ( SUM ( 'Table'[CountofContacts] ) )
        ),
        [@count] IN VALUES ( Counts[Value] )
    ),
    [@count]
)

Result

danextian_0-1745929236482.png

danextian_1-1745929280362.png

Please see the attached sample pbix.

 





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.

@danextian Thank you for the response. but there is an issue. The Y axis is the count of student id, which in this case will be 1. But as per your pbix, it is plotting count of contacts grouped with value .

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.