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
AlexaderMilland
Helper III
Helper III

Measures as a dimension?

So I don't know why I can't get the grasp on how to do this.

For a simple version i have an "Orders" table with just 3 columns

 

OrderID | CustomerID | Date 

 

I want a matrix visual that shows me 

How many customers purchased a total of 1 order, 2 orders, 3 orders etc etc. 

 

I simple can't find a way to do this using measures to distinctcount orders and customers respectively.

I need it to be measures, since the user input has to be a date range or similar (or other filters in the model which is vastly greater than the simplified table above). 

 

Output would simple just be something like: 

#Orders | #Customers

1 | 200

2 | 75 

3 | 47 

4 | 35

5 | 21

 

I can easily do this as a calculated column on a seperate customer table, but that wont allow dynamic filtering/slicing.

 

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@AlexaderMilland Create a separate, disconnected table to store your order numbers in a single column

1

2

3

4

5

 

Put that in a table visual along with this measure:

Measure =
  VAR __Count = MAX('Disconnected Table'[Orders])
  VAR __Table = SUMMARIZE( 'Orders', [CustomerID], "__Value", COUNTROWS('Orders') )
  VAR __Result = COUNTROWS( FILTER( __Table, [__Value] = __Count ) )
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

You mean an index table that just goes from 1 to infinity (or well some max i set) ?

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.