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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
PBI5851
Helper V
Helper V

Assistance with a bar chart

Hello,

 I have two tables as  below. 

MainTable

OrdIDOrdDateSalesPOrdStatus
A1235/1/2022StevePending
A1245/2/2022JackieShipped
A1255/3/2022SteveComplete
A1265/4/2022MaryComplete
A1275/5/2022JohnComplete

 

outreach table

OTIDOrdIDOutTypeOutDate
O123A125Phone5/4/2022
O124A125Virtual5/5/2022
O125A125Virtual5/6/2022
O126A125Virtual5/7/2022
O127A125Phone5/8/2022
O128A125F2F5/9/2022
O129A125F2F5/10/2022
O130A125Phone5/11/2022
O131A126F2F5/4/2022
O132A126F2F5/4/2022
O133A126Phone5/8/2022
O134A126Phone5/9/2022
O135A126Virtual5/5/2022
O136A127Virtual5/6/2022
O137A127Virtual5/7/2022
O138A127Virtual5/8/2022
O139A127Virtual5/9/2022

 

Main is joined to Outreach by OrdID.  End goal is to display a chart with how many orders have 0, 1, 2, 3 , 4 etc outreach attempts. 

So, the x-axis will be 0,1,2,3,4

The y Axis would be 1, 0 ,0 ,0 ,1, 1, 0,0,0 (1 ord had 0 outreach, 0 ord have 2 outreach...., 1 ord had 4 outreach etc). 

 

In order to accomplish this, i used a summarized table and was able to get the numbers, but the ones with 0 outreaches, dont show up.  , since the join to main table missed the missing id in the summarized table. 

 

Any recommendation on how to resolve the sumarized table or any other solution on achieving the goal. 

 

Thank you.

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @PBI5851 ,

 

Please create the table and measure.

 

Table = GENERATESERIES ( 0, COUNTROWS ( 'outreach table' ) )
Measure = 
VAR tab =
    SUMMARIZE (
        MainTable,
        MainTable[OrdID],
        "CountNum", COUNTROWS ( 'outreach table' ) + 0
    )
RETURN
    COUNTROWS ( FILTER ( tab, [CountNum] = MAX ( 'Table'[Value] ) ) )

vkkfmsft_0-1657252076039.png


If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-kkf-msft
Community Support
Community Support

Hi @PBI5851 ,

 

Please create the table and measure.

 

Table = GENERATESERIES ( 0, COUNTROWS ( 'outreach table' ) )
Measure = 
VAR tab =
    SUMMARIZE (
        MainTable,
        MainTable[OrdID],
        "CountNum", COUNTROWS ( 'outreach table' ) + 0
    )
RETURN
    COUNTROWS ( FILTER ( tab, [CountNum] = MAX ( 'Table'[Value] ) ) )

vkkfmsft_0-1657252076039.png


If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors