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 all,
based on the year quarter previous year quarter value need
for example if i select 2020 Q3 i need result of 2019 Q3 value
i have used the measure =
If you have a Dates Table, then this can be done with the SAMEPERIODLASTYEAR function.
CY FY Actual rate netherland = ROUND( CALCULATE ( SUM ( 'table'[Value] ), )/1000,0)
PY FY Actual rate netherland = CALCULATE ( CY FY Actual rate netherland, SAMEPERIODLASTYEAR (DATES(Date))
Then whatever date slicer you pick will automatically calculate the same corresponding period.
@Anonymous , Based on what I got, please find the examples
if you have a date , then with date table and TI
QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
Last year same QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,Year)))
Last year same QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(ENDOFQUARTER(dateadd('Date'[Date],-1,Year))))
if you do not have Date, Based on rank on year Qtr or qtr start date
new column
Qtr Rank = RANKX(all('Date'),'Date'[Qtr Start date],,ASC,Dense)
or
Qtr Rank = RANKX(all('Date'),'Date'[year Qtr],,ASC,Dense)
measure
This Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])))
Last Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])-1))
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 |
---|---|
39 | |
19 | |
17 | |
16 | |
15 |
User | Count |
---|---|
50 | |
23 | |
20 | |
17 | |
16 |