Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello there, I have a table that stores each call made. But I want to calculate an average of one users successful calls in the past 30 days. Here is an example of the table below:
It has the start and end dates for each call, and a true or false value for each successful call made, I only want to count the true ones. Is there any way to do this?
Solved! Go to Solution.
@Anonymous , with help from date table
Rolling 30 = CALCULATE(AverageX(values(Table[USerID]),CALCUALTE(countrows(filter(Table,Table[Sucessfulcall]=true())))),DATESINPERIOD('Date'[Date],max('Date'[Date]),-30,Day))
Join date of date table with date in table without time, if date has time , then create a date column
Date = [datetime].date
or
Date = date(year([datetime]),month([datetime]),day([datetime]))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
@Anonymous , with help from date table
Rolling 30 = CALCULATE(AverageX(values(Table[USerID]),CALCUALTE(countrows(filter(Table,Table[Sucessfulcall]=true())))),DATESINPERIOD('Date'[Date],max('Date'[Date]),-30,Day))
Join date of date table with date in table without time, if date has time , then create a date column
Date = [datetime].date
or
Date = date(year([datetime]),month([datetime]),day([datetime]))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.