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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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