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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors