Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I need help on how to calculate sum of measure of a meausre
I have a table with Price and Date fields. Below is the table which has Year and Quarter as filters
Price is the sum of Price.Price Previous Quarter is sum of price previous Quarter.
Difference in Price is Difference in Price and Previous Quarters.
Now, I wanted to calculate sum of Difference in Price as shown in Sum of Difference field.
I have been trying to achieve the results using various options like combining all calculation in a single measures, but no sucess yet.
Please help me on how to sum the difference in price. I would appreciate any help/suggestions.
Thank you!!
Measures
Price = SUM(Price)
Price Previous Quarter = CALCULATE([Price], PREVIOUSQUARTER(Date_Table[Date]) )
Difference in Price = Price Previous Quarter - Price
| Year | Quarter | Price | Price Previous Quarter | Difference in Price | Sum of Differences |
| 2018 | Q1 | 967 | 0 | 967 | 967 |
| 2018 | Q2 | 1115 | 967 | 148 | 1115 |
| 2018 | Q3 | 1432 | 1115 | 317 | 1432 |
| 2018 | Q4 | 1455 | 1432 | 23 | 1455 |
| 2019 | Q1 | 1863 | 1455 | 408 | 1863 |
| 2019 | Q2 | 1952 | 1863 | 89 | 1952 |
| 2019 | Q3 | 1988 | 1952 | 36 | 1988 |
| 2019 | Q4 | 2018 | 1988 | 30 | 2018 |
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Now, I wanted to calculate sum of Difference in Price as shown in Sum of Difference field.
Can you explain again what results you are trying to get?
The results in the last column in the sample above???
What is the difference between the 3rd column calculated by your Price Measure and the results you want in the last?
Am I missing something?
Hi Sean,
I have added calculate to get the difference of Price and Price Previous Quarter. I removed the calculate in Var and try to dervie the difference and i am getting the same results.
Please let me know if you need any further information. Also, Help me out in getting the sum of difference in price
Thank you!!
Hi Sean,
Thanks for responding.
I have provided different example, so that i will be more clear. Now, I wanted to derive a new measure to calculate the sum of difference in Price ( as shown in below column 6). We wanted to derive the sum of difference in price to show the savings per quarter.
I got struck at deriving the sum of difference field, I would appreciate any suggestion on acheiving the same.
Thank you!!
Measures
1. Price = CALCULATE(SUM(Price_Table[price]))
2. Price Previous Quarter = CALCULATE([Price], PREVIOUSQUARTER(Date_Table[Date]))
3. Difference in Price = var price_comparison = CALCULATE([Price Previous Quarter] - [Price])
return if(ISBLANK([Price Previous Quarter]),0, price_comparison)
| Year | Quarter | Price | Price Previous Quarter | Difference in Price | Sum of Difference |
| 2018 | Qtr 1 | 2630.9 | 0 | 0 | |
| 2018 | Qtr 2 | 2630.9 | 2630.9 | 0 | 0 |
| 2018 | Qtr 3 | 2630.9 | 2630.9 | 0 | 0 |
| 2018 | Qtr 4 | 2600.9 | 2630.9 | 30 | 30 |
| 2019 | Qtr 1 | 2564.65 | 2600.9 | 36.25 | 66.25 |
| 2019 | Qtr 2 | 2475.9 | 2564.65 | 88.75 | 155 |
| 2019 | Qtr 3 | 2067.15 | 2475.9 | 408.75 | 563.75 |
| 2019 | Qtr 4 | 2044.65 | 2067.15 | 22.5 | 586.25 |
| 2020 | Qtr 1 | 1727.15 | 2044.65 | 317.5 | 903.75 |
| 2020 | Qtr 2 | 1404.65 | 1727.15 | 322.5 | 1226.25 |
| 2020 | Qtr 3 | 945.9 | 1404.65 | 458.75 | 1685 |
| 2020 | Qtr 4 | 859.65 | 945.9 | 86.25 | 1771.25 |
| 2021 | Qtr 1 | 39.65 | 859.65 | 820 | 2591.25 |
| 2021 | Qtr 2 | 24.65 | 39.65 | 15 | 2606.25 |
| 2021 | Qtr 3 | 0 | 24.65 | 24.65 | 2630.9 |
| 2021 | Qtr 4 | 0 | 0 | 0 | 2630.9 |
| 2022 | Qtr 1 | 0 | 0 | 0 | 2630.9 |
| 2022 | Qtr 2 | 0 | 0 | 0 | 2630.9 |
| 2022 | Qtr 3 | 0 | 0 | 0 | 2630.9 |
| 2022 | Qtr 4 | 0 | 0 | 0 | 2630.9 |
Hi,
Could you share the link from where i can download your PBI file.
Hi Asish,
Can you share your email ID, so that i will add to my drop box and share the link.
Also, Please let me know if you have any other option to share the PBIX file
Thank you!!
Hi,
Upload your file to Google Drive/OneDrive and share the download link here.
Hi Ashish,
Please find the below link to download the PBIX files
https://drive.google.com/file/d/1yIz_Pf9nWxvWFy2JSZTyZxyg9T6QmZEp/view?usp=sharing
Also, let me know if you need any further information
Hi,
You may download my PBI file from here.
Hope this helps.
Hi Ashish,
It worked for me. Thanks a lot. I appreciate your help.
Thank you!!
You are welcome.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!