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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
admtb20
Frequent Visitor

Count number of times value appears on different dates

Hello everyone!

 

I'm trying to produce a report that shows how many purchases a client has made on different dates, given that a person can make multiple purchases on the same day. This is what I'm trying to achieve:

 

admtb20_1-1656081616185.png

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Drag Client to a Table visual and write this measure

Measure = Distinctcount(DetalleArreglos[Order Date])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

Drag Client to a Table visual and write this measure

Measure = Distinctcount(DetalleArreglos[Order Date])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

That worked! Thanks a lot

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
sevenhills
Super User
Super User

Say, if your table has these columns "Order Date, Client Name, Order ID"

 

Count of Client Orders = 
CALCULATE( 
   DISTINCTCOUNT('table'[Order ID]), 
   ALLEXCEPT('table', 'table'[Order Date], 'table'[Client Name],'table'[Order ID])
)

 

I only have Order Date and Order ID. This is what I have in the actual model

 

Order Count = CALCULATE(
DISTINCTCOUNT(DetalleArreglos[Order ID]) ,
ALLEXCEPT(DetalleArreglos , DetalleArreglos[Order Date], DetalleArreglos[Order ID]))

 

admtb20_2-1656318711108.png

 

 

Taking the first ID as an example, this is the raw information

admtb20_1-1656318501707.png

The ID appears on 5 different dates and that is what I want the model to show.

I cannot read spanish, sorry.

 

Have sample raw data in Excel and copy, paste here.

Have expected data in Excel and copy, paste here.

 

speedramps
Community Champion
Community Champion

Answer =
CALCULATE(

COUNTROWS(yourtable),

ALL(youtable[dates])

)

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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