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 Team
Please can you help me on below issue. I have created a table like below in power bi.
By default current month selection is applied and calculated CY and PY measures like below
CY= CALCULATE( Sum(SalesNetAmountGBP]),Date'[CurrentDayOffset]<=0)
Thanks in advance
Solved! Go to Solution.
Hi @Pawan
please try
PY =
CALCULATE (
[CY],
FILTER (
SAMEPERIODLASTYEAR ( 'Date'[Date] ),
FORMAT ( [Date], "MMDD" ) <= FORMAT ( TODAY (), "MMDD" )
)
)
Hi @Pawan
please try
PY =
CALCULATE (
[CY],
FILTER (
SAMEPERIODLASTYEAR ( 'Date'[Date] ),
FORMAT ( [Date], "MMDD" ) <= FORMAT ( TODAY (), "MMDD" )
)
)
@Pawan ,
PY = CALCULATE([CY], SAMEPERIODLASTYEAR('Date'[Date]), format([Date],"MMDD") <= format(today() ,"MMDD") )
@amitchandak thank you for your reply. The above solution works only for complete year(2022) selection. But is breaking when we select month or quarter. The measure should be dynamic based on Date selection.
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 | |
14 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |