Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I need to create a visual with calculate the sum of AmountCY and AmountLY, withrevenue year and month. The data has Amount, IDs, RDate, IntDate. I have to calculate sum of Amount for previous year(based on RDate column) for only those IDs which were present in selected date range and on a particular IntDate. I have calculated two measures AmountCY and AmountLY.
where Rdate range =01/01/2020 to 10/30/2020
I need AmountLY values only for Id =110 . As the Rdate for Previous year will be =01/01/2019 to 10/30/2019. and only this id was present in selected Rdate range(current year range)
| AmountLY | ID | AmountLY | RDate | IDate |
| 10000 | 100 | 5/27/2020 | 7/26/2020 | |
| 102 | 126.3 | 9/6/2019 | 7/26/2020 | |
| 110 | 3000 | 3/30/2019 | 7/26/2020 | |
| 3000 | 110 | 4/18/2020 | 7/26/2020 | |
| 122 | 7.03 | 7/12/2019 | 7/26/2020 | |
| 122 | 1500 | 7/13/2019 | 7/26/2020 | |
| 132 | 1052.5 | 5/20/2019 | 7/26/2020 |
@sydv , You can join RDate with date table and use that as slicer
Sum(Table[AmountCY]) is for that range
Year behind = CALCULATE(Sum(Table[AmountCY]),dateadd('Date'[Date],-1,Year))
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.
Hi,
Thanks for points,
But this would again give the same values as I have in AmountLY measure.
while I need values against only those ID's in Year Behind measure which are present in current year. i.e. AmountLY for ID -110 only.
Regards
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 8 | |
| 8 |