简体   繁体   中英

Excel PowerPivot DAX SUMX

I have an Excel table holding current occupancy and estimated occupancy a week down the line reported by different facilities. Table structure is as following


Facility | Start_Date | End_Date |Occupancy_on_Start_Date  | Expected_Occupancy_on_End_Date |
A        |01-07-20    |08-07-20  |05                       |15                              |
A        |08-07-20    |15-07-20  |17                       |09                              |
A        |15-07-20    |22-07-20  |10                       |16                              |
B        |08-07-20    |15-07-20  |16                       |13                              |

I have to check the correctness of the estimated occupancy, by comparing the occupancy estimated in one week with actual occupancy reported in the following week. I tried to create a measure in Excel PowerPivot using SUMX and Calculate functions. However, I am not able to get a result, because comparing the values of Start_Date and End_Date in different rows is not possible.

Any thoughts please?

Thanks in advance.....

Solved it by using SUMIFS function. thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM