Forum Discussion
Selected Value based Last 7 days value required
- Anonymous1 year ago
Hi, itsranga
I failed to open your link. I have simply modelled some data which I hope will solve your problem.
Measure = SWITCH(TRUE(), SELECTEDVALUE(Table1[CreatedDate])=BLANK(),1, SELECTEDVALUE(Table2[Schedule date])<=SELECTEDVALUE(Table1[CreatedDate]) &&SELECTEDVALUE(Table2[Schedule date])>=SELECTEDVALUE(Table1[CreatedDate])-6,1, 0)The two tables cannot be related. Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
if its static value means this measure woking suppose dynamically selected value means its not working
for example in this measure
above picture highlighted i put 6 as a static values its working
if i try to filter dynamic value, i have dates between slicer, i have start date and end date im using one Measure to find days between two dates
startdate = VALUE(DATEDIFF(MIN('Calendar'[Date]),MAX('Calendar'[Date]),DAY))
and im adding this measure into existing measure
Filter =
var _seldate = VALUE(DATEDIFF(MIN('Calendar'[Date]),MAX('Calendar'[Date]),DAY))
Var _fitler =
SWITCH(
TRUE(),
SELECTEDVALUE(Incident[CreatedDate_1]) = BLANK(), 1,
SELECTEDVALUE(CR[Schdule_Start_Date]) <= SELECTEDVALUE(Incident[CreatedDate_1]) &&
SELECTEDVALUE(CR[Schdule_Start_Date]) >= (SELECTEDVALUE(Incident[CreatedDate_1])- _seldate), 1,
0
)
return _fitler
its not working