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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
BarryMangham
Regular Visitor

Summarise measure values by groups

I'm still very new to Power BI and learning as quickly as possible, but this is something I'm struggling to get my head around. I have a measure on a table that gives values ranging from -100 to 100 in increments of 10, for example:

 

-10
30
50
-80
30
90
10

 

I would like to summarise the number of times each measure occurs in a table like so:

 

-100 
-90 
-801
-70 
-60 
-50 
-40 
-30 
-20 
-101
0 
101
20 
302
40 
501
60 
70 
80 
901
100 

 

I'm not too sure how to achieve this, and really struggling to find similar solutions.

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

First create a numeric parameter to store the possible values of the measure, ranging from -100 to 100 with an increment of 10. Untick the option to add a slicer to the page, as you won't need it.

Next you need to understand which tables and columns you are summarizing the measure by. For the sake of example I will summarize the Sales table by product category and month.

Create a measure like

Num occurences =
VAR CurrentValue = [Parameter Value]
VAR SummaryTable =
    ADDCOLUMNS (
        SUMMARIZE ( Sales, 'Date'[Year month], 'Product'[Category] ),
        "@num", [Measure you want to count]
    )
VAR Result =
    COUNTROWS ( FILTER ( SummaryTable, [@num] = CurrentValue ) )
RETURN
    Result

Finally, create a visual using the parameter table you created and the new measure.

View solution in original post

2 REPLIES 2
BarryMangham
Regular Visitor

Perfect thank you, solved what I needed to do!

johnt75
Super User
Super User

First create a numeric parameter to store the possible values of the measure, ranging from -100 to 100 with an increment of 10. Untick the option to add a slicer to the page, as you won't need it.

Next you need to understand which tables and columns you are summarizing the measure by. For the sake of example I will summarize the Sales table by product category and month.

Create a measure like

Num occurences =
VAR CurrentValue = [Parameter Value]
VAR SummaryTable =
    ADDCOLUMNS (
        SUMMARIZE ( Sales, 'Date'[Year month], 'Product'[Category] ),
        "@num", [Measure you want to count]
    )
VAR Result =
    COUNTROWS ( FILTER ( SummaryTable, [@num] = CurrentValue ) )
RETURN
    Result

Finally, create a visual using the parameter table you created and the new measure.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.