Forum Discussion
Help with SELECTEDVALUE measure please
- 4 years ago
Hi, MWare
You can try the following methods.
Maesure:
Measure 2 = Var p=CALCULATE(max(Date_Period_Table[Period]),ALL(Date_Period_Table),Date_Period_Table[Date]=SELECTEDVALUE('Date'[Date])) return IF(SELECTEDVALUE(Date_Period_Table[Period])=p && SELECTEDVALUE(Date_Period_Table[Date])=SELECTEDVALUE('Date'[Date]),"Day Selected", IF(SELECTEDVALUE(Date_Period_Table[Period])=p && SELECTEDVALUE(Date_Period_Table[Date])<=SELECTEDVALUE('Date'[Date]),"PTD" ))Measure 3 = IF([Measure 2]=SELECTEDVALUE('Reporting View'[Reporting View]),1,0)At this point the result can be run in a view.
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.
Hi, MWare
You can try the following methods.
Maesure:
Measure 2 =
Var p=CALCULATE(max(Date_Period_Table[Period]),ALL(Date_Period_Table),Date_Period_Table[Date]=SELECTEDVALUE('Date'[Date]))
return
IF(SELECTEDVALUE(Date_Period_Table[Period])=p && SELECTEDVALUE(Date_Period_Table[Date])=SELECTEDVALUE('Date'[Date]),"Day Selected",
IF(SELECTEDVALUE(Date_Period_Table[Period])=p && SELECTEDVALUE(Date_Period_Table[Date])<=SELECTEDVALUE('Date'[Date]),"PTD"
))
Measure 3 =
IF([Measure 2]=SELECTEDVALUE('Reporting View'[Reporting View]),1,0)
At this point the result can be run in a view.
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.
- MWare4 years ago
Helper I
v-zhangti I've tried to replicate the solution in my actual model but it doesn't work as the relationship between the date and sales table in my actual model is One to Many (cross filter both directions) and not One to One as it is in the sample model provided. Do you know if there is a way round this please?