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
Collins26390
Frequent Visitor

Calculate number of Visits Per Day

Hello,

 

I am trying to create a visual to demonstrate the number of visits that my engineers have completed over time. This should allow me to add slicers to do some analysis based on visits per location, per engineer etc. I have added a RealTimeData table from a streaming dataset to my Power BI report, which contains details of the location, engineer, date/time of last visit etc.

 

I have experimented with various DAX expressions to show how the visit numbers fluctuate over time, but so far I have been unsuccessful. 

 

Collins26390_0-1699445592534.png

Based on the data above, what I want to show is that there were 10 visits on 22/09/2023, 1 on 25/09/2023, 18 on 26/09/2023 and so on.

 

Any assistance would be greatly appreciated!

5 REPLIES 5
Dangar332
Super User
Super User

Hi, @Collins26390 

try below code
just adjust your table and column name

 

result =
  SUMX(
     FILTER(
        'Tablename',
         'Tablename'[date]=MAX('Tablename'[date])
     ),
     'Tablename'[visits]
   )

 

Hi @Dangar332 ,

 

Thank you for coming back to me. I've tried implementing your solution, but I'm a little confused about which column 'Tablename'[visits] should correspond to. PSB a sample of the table I'm working on:

 

Collins26390_0-1699464445688.png

I've tried using [Last Visit] with your formula, but it just seems to be replicating the information that is already in that column.

 

Thanks

Hi, @Collins26390 
try below

result =
calculate(
    sum('Tablename'[visits]), 
    'Tablename'[last visit]=MAX('Tablename'[last visit]),
    allexcept('tablename','tablename'[last visit])
  )
  

@Dangar332 ,

 

Sorry, that doesn't work. I don't have a 'visits' column, only the ones listed above.

HI, @Collins26390 

try below

visit count=
  calculate(
      count('tablename'[last visit]),
      allexcept('tablename','tablename'[last visit])
   )

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
Top Kudoed Authors