Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Weekly sales graph, per day based on selected date

  Hello all geniuses!   I am working on some sales overview dashboard within retail. The source is more or less real-time and both the cube and several reports are working fine. My main issue now ...
  • v-yuta-msft's avatar
    7 years ago

    Hi Zarius,

     

    You may create a measure using DAX formula like pattern below:

    Result =
    VAR weeknum =
        CALCULATE (
            MAX ( Table[weeknum] ),
            FILTER ( ALL ( Table ), Table[Date] = SELECTEDVALUE ( Table[Date] ) )
        )
    RETURN
        IF ( MAX ( Table[weeknum] ) = weeknum, MAX ( Table[Date] ), BLANK () )

    Regards,

    Jimmy Tao