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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
cwharris15
New Member

Count the frequency of a record by frequency

Hi Community! 

 

I have a data set where I'm trying to identify the frequency an order number is repeated by the number of times it is repeated. For example in the set below I have 4 orders. Each item that is in the order has a separate record. Therefore there are 4 orders that consist of (7) different items.

 

Order NumberItem
123ABC
123DEF
456GHI
789JKL
789MNO
789PQR
101STU

 

I am trying to visualize the number of items that are in a box by the number of items to return something like below. Where I can see that only 1 item was need for 2 orders (frequency), 2 items were needed for 1 order, and 3 items were needed for 1 order. 

 

Number of itemsFrequency
12
21
31
1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @cwharris15 - create a new calculated table that counts the number of items per order as below:

 

OrderItemCount =
ADDCOLUMNS(
    SUMMARIZE(
        'Frequ',
        'Frequ'[Order Number],
        "ItemCount", COUNT('Frequ'[Item])
    ),
    "Frequency", COUNTROWS(FILTER('Frequ', [Order Number] = EARLIER('Frequ'[Order Number])))
)

rajendraongole1_1-1722440339049.png

 

Create one more table using calculated table to summarizes the number of orders by the number of items.

rajendraongole1_2-1722440375257.png

 

ItemFrequency =
SUMMARIZE(
    OrderItemCount,
    OrderItemCount[ItemCount],
    "Frequency", COUNT(OrderItemCount[Order Number])
)
 
Now take one table visual in report view add the fields Item count and Frequency
rajendraongole1_3-1722440414191.png

 

Hope it helps

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @cwharris15 - create a new calculated table that counts the number of items per order as below:

 

OrderItemCount =
ADDCOLUMNS(
    SUMMARIZE(
        'Frequ',
        'Frequ'[Order Number],
        "ItemCount", COUNT('Frequ'[Item])
    ),
    "Frequency", COUNTROWS(FILTER('Frequ', [Order Number] = EARLIER('Frequ'[Order Number])))
)

rajendraongole1_1-1722440339049.png

 

Create one more table using calculated table to summarizes the number of orders by the number of items.

rajendraongole1_2-1722440375257.png

 

ItemFrequency =
SUMMARIZE(
    OrderItemCount,
    OrderItemCount[ItemCount],
    "Frequency", COUNT(OrderItemCount[Order Number])
)
 
Now take one table visual in report view add the fields Item count and Frequency
rajendraongole1_3-1722440414191.png

 

Hope it helps

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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