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.
- fernamario2 years agoRegular Visitor
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.
- fernamario2 years agoRegular Visitor
Clara, unfortunately, the results are skewed after I applied the measure. Would it be easier if I attached the files for your review?
- Anonymous2 years agoNot applicable
Hi fernamario ,
Yes, if you upload the file and provide the desired effect, I will understand you better and help you get the desired result. If your data volume is relatively large or has private data, you can create some representative data yourself for easier understanding.
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.
- fernamario2 years agoRegular Visitor
Clara, unfortuantely, I cannot upload the file since the org blocks the use of any external cloud storage. Any other options? Let me see if I can use my home PC and personal account to upload.