Hello you all,
I have this visual
and i’d like that my measure (on the far right) just show me the values of 2018 and then another measure for 2019 and so on. I’ve try this…but can’t accept it:
CALCULATE(
[Receipt Val],
FILTER(Dates, Dates[Year] = "2018" &&
ALLSELECTED('Dates'[Weeknum]),
ISONORAFTER('Dates'[Weeknum], MAX('Dates'[Weeknum]), DESC)
)
)
Thanks a lot
Pedro
Greg
July 28, 2020, 7:17pm
2
Hi @pedroccamara . Can you share a sample PBIX file to go along with the expected outcome image you provided? Thanks, Greg
BrianJ
July 28, 2020, 7:18pm
3
@pedroccamara ,
I recently worked on a similar solution for resetting cumulative totals on a different field. Here’s the general structure from that thread:
(1) is the cumulative total pattern
(2) resets it for each value of the relevant field using ALLEXCEPT()
Hopefully, this gets you what you need. If not, please provide your PBIX and I can provide a more specific solution.
Thanks.
P.S. Here’s another thread I found, with a biennial reset of cumulative total. Pattern will be the same, just with FY for your case.
@lmcvay ,
Welcome to the forum!
I’m sure there are a lot of different ways to approach this one, but the approach I used was based on two calculated columns added to your date table. The first defines each biennial period:
Biennial Grouping =
VAR LstYear =
dCalendar[Year] - 1
VAR NxtYear =
dCalendar[Year] + 1
RETURN
IF(
ISEVEN( dCalendar[Year] ),
CONCATENATE( dCalendar[Year], NxtYear ),
CONCATENATE( LstYear, dCalendar[Year] )
)
The second re-numbers each month in the bienni…
Hey @BrianJ
I’m so tired right now. So sorry. I’ll give it a try tomorrow. Meanwhile…what is fAmount (in your dax), in my case?
BrianJ
July 28, 2020, 9:54pm
5
@pedroccamara ,
No worries. Just proceed according to your time schedule as needed. I’ve got plenty to keep myself busy in the interim …
fAmount is a key table in that solution. In your case it will be something like:
ALLEXCEPT(
Dates,
Dates[FY]
)
1 Like
Thank you so much @BrianJ
Your solution opened my eyes to the obvious: i’ve create a calculate measure for each year and made a simple cumulative measure like this
CALCULATE (
[T 2018],
FILTER ( ALL ( Dates ), Dates[Weeknum] <= MAX ( Dates[Weeknum] ) )
)
and it’s working.
Thank a lot Brian