Forum Discussion
MWare
Helper I
4 years agoHelp with SELECTEDVALUE measure please
Hi all, I'm looking for some help with a SELECTEDVALUE measure. I've created 2 seperate measures and applied them as filters to 2 seperate tables and can return the result I'm looking for howeve...
- 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.
MWare
Helper I
4 years agov-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?