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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
dapoole
New Member

Create bar chart in Power BI desktop to display number of times invoiced by count of customers?

Hi there,

 

I am trying to create a bar chart to represent the number of number invoices. Along the x-axis would be the number of invoices sent as a grouping, while the y-axis should show the total number of customer. For example, an x-axis value of 2 and a y-axis value of 2 would illustrate that 2 customers have been sent an invoice 2 times. At present my table is similar format to:

 

    CustomerID  InvoiceRef  DateInvoiced  ValueInvoice

    1                   1                 20180101       100

    2                   2                 20180101       1000

    3                   3                 20180102       300

    2                   4                 20180102       200

    1                   5                 20180102       10

    4                   6                 20180103       50

    1                   7                 20180104       110

    3                   8                 20180104       10

    1                   9                 20180105       55

    1                   10               20180105       1000

 

Customer 4 has been invoiced 1 time.

Customer 3 has been invoiced 2 times.

Customer 2 has been invoiced 2 times.

Customer 1 has been invoiced 5 times.

 

But how do I create the bar chart in Power BI desktop to display number of times invoiced by count of customers?

 

TIA

 

 

 

 

 

4 REPLIES 4
BobBI
Resolver III
Resolver III

Table1 (original table)Table1 (original table)Calculated tableCalculated tableBar chartBar chartCreate a calcualted table

 

Table1  is your original table from example ( just pick few coulmns)

 

 

table below is a calculated table to calculated count of invoice by customer.

 

Table = ADDCOLUMNS(
                        SUMMARIZE(Table1,Table1[id])
                ,"count",
                CALCULATE(count(Table1[id]),ALLEXCEPT(Table1,Table1[id]))
)

 

Hope this helps.

 

Cheers

Bob

Thank you for your reply. However I may not have explained clearly enough that the x-axis should be the number of times invoiced. And the y-axis the number of companies invoiced those number of times.  

you can achieve this  just by swaping axis object into values and values object into Axis

add 'id':customer  into Legend will show different customers in the bar.

 

count = no of times invoiced

Id= customer

 

 

 

 

 

Capture1.JPG

 

hope this helps,

Bob 

 

Thanks again. I think I see what you mean. So I have to create a separate table in DAX. What if I only wanted that table to show 'failed to pay invoices in time'? For example if there was another column in the Invoices table called 'FailedToPayInTime'. How would this be written into the DAX table?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors