Forum Discussion
Help with SELECTEDVALUE
- 4 years ago
Hi MWare ,
According to your description, I download your pbix. Here's my solution, modify the formula like this:
Measure PTD = VAR p = MAXX ( FILTER ( ALL ( Date_Period_Table ), Date_Period_Table[Date] = SELECTEDVALUE ( 'Date'[Date] ) ), Date_Period_Table[Period] ) RETURN IF ( SELECTEDVALUE ( Date_Period_Table[Period] ) = p && SELECTEDVALUE ( Date_Period_Table[Date] ) <= SELECTEDVALUE ( 'Date'[Date] ), "PTD" )Get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi MWare ,
According to your description, I download your pbix. Here's my solution, modify the formula like this:
Measure PTD =
VAR p =
MAXX (
FILTER (
ALL ( Date_Period_Table ),
Date_Period_Table[Date] = SELECTEDVALUE ( 'Date'[Date] )
),
Date_Period_Table[Period]
)
RETURN
IF (
SELECTEDVALUE ( Date_Period_Table[Period] ) = p
&& SELECTEDVALUE ( Date_Period_Table[Date] ) <= SELECTEDVALUE ( 'Date'[Date] ),
"PTD"
)
Get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yanjiang-msft Many thanks for taking the time to download the sample file and solving my issue - top kudos!