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, 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.
- fernamario2 years agoRegular Visitor
Here are both files.
https://drive.google.com/file/d/1e48McKzwaAXxgtndeii5N2H7LgeQA5k2/view?usp=sharing
- lbendlin2 years agoSuper User
The % of mem is redundant.
Note the blue "i" - that is a (bad) indicator that not all data is shown. If you want to avoid the automatic sampling yu need to bring your own.