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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a data that provides values of sales for 2 years but on quarterly basis, Example:
| Year | Quarter | Sales |
| 2020 | Q1 | 50 |
| 2020 | Q2 | 30 |
| 2020 | Q3 | 40 |
| 2020 | Q4 | 50 |
| 2021 | Q1 | 60 |
| 2021 | Q2 | 70 |
| 2021 | Q3 | 50 |
| 2021 | Q4 | 40 |
I need to calculate the sum of sales for the quarters previous to the chosen quarter (giving a slicer for the same)
Till now I have used the following DAX, but am unsuccessful:
Solved! Go to Solution.
@Anonymous , With Time intelligence, create QTD and YTD and table a diff
example
QTD= CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
YTD= CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Till Last Qtr = [YTD] -[QTD]
@Anonymous , With Time intelligence, create QTD and YTD and table a diff
example
QTD= CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
YTD= CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Till Last Qtr = [YTD] -[QTD]
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |