Forum Discussion

MWare's avatar
MWare
Helper I
4 years ago
Solved

Help 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...
  • v-zhangti's avatar
    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.