Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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]
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |