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.
Hi,
Solved! Go to Solution.
According to the data you provided, the result should be 80.
Measure = CALCULATE(
SUM('Table'[Sales]),
FILTER('Table',
'Table'[FRGI date]<'Table'[DGI date]&&
'Table'[FRGI date]>=DATEADD('Table'[DGI date].[Date],-1,QUARTER)))
@AishwariyaV , whar are you trying to achieve here ?
refer these examples
QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
Last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))
Last QUARTER Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD( ENDOFQUARTER(dateadd('Date'[Date],-1,QUARTER))))
Last QUARTER Sales = CALCULATE(SUM(Sales[Sales Amount]),PREVIOUSQUARTER(('Date'[Date])))
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
next month Sales = CALCULATE(SUM(Sales[Sales Amount]),nextmonth('Date'[Date]))
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
FRGI date DGI date Sales
01/01/2021 01/04/2021 40
16/02/2021 01/04/2021 30
01/04/2021 01/07/2021 10
21/03/2021 12/07/2021 20
11/12/2020 01/04/2021 50
The result should be 40 + 30 = 70.
According to the data you provided, the result should be 80.
Measure = CALCULATE(
SUM('Table'[Sales]),
FILTER('Table',
'Table'[FRGI date]<'Table'[DGI date]&&
'Table'[FRGI date]>=DATEADD('Table'[DGI date].[Date],-1,QUARTER)))
Hi @V-lianl-msft ,
The FRGI date should be equal to previous quarter only and not the current quarter. 01/04/2021 (DD-MM-YYYY), falls under current quarter.
Let me give a try with the measure.
Thanks 😊
I want the sum of sales with filter as,
FRGI Year = Year which falls in the previous quarter from current date
FRGI Quarter = Previous quarter from the current date
DGI year = current year from current date
DGI quarter = current quarter from current date
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 |
---|---|
97 | |
94 | |
74 | |
71 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |