Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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" )
)
)
@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.
User | Count |
---|---|
16 | |
13 | |
12 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
15 | |
11 | |
9 |