Forum Discussion
Issues with comparing data using date ranges
Hi fernamario ,
Based on your description, I understand utilization as the "% of avail mem" field. The following data was created:
1. Create a measure, write an expression, calculate the average utilization of the two dates, and then compare.
Measure =
VAR DateRange1 = FILTER(ALL('Table'),'Table'[date time] >= DATE(2024,2,2) && 'Table'[date time] <= DATE(2024,2,16))
VAR Utilization1 = CALCULATE(AVERAGE('Table'[% of avail mem]), DateRange1)
VAR DateRange2 = FILTER(ALL('Table'),'Table'[date time] >= DATE(2024,2,20) && 'Table'[date time] <= DATE(2024,3,1))
VAR Utilization2 = CALCULATE(AVERAGE('Table'[% of avail mem]), DateRange2)
RETURN
IF(Utilization1 >= Utilization2,Utilization1,Utilization2)
2. The final result is shown in the figure below.
If my understanding is wrong, please provide more detailed pbix files or screenshots to better help you solve the problem.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Clara, thank you so much for this. One question, if I wanted to run this for each server, what is needed in the Measure?
I changed the values for % of avail mem to CPU and Avail Mem for different measures.