Forum Discussion

SaCvP125's avatar
SaCvP125
Frequent Visitor
8 years ago
Solved

Create a Clustered Column Chart using Two Summarize Measures

Hi guys,   I'm trying to create the following query using DAX: WITH OPEN_DATA                         AS                             (                             SELECT COUNT(DISTINCT [Ticket ...
  • v-chuncz-msft's avatar
    8 years ago

    SaCvP125,

     

    Add a calendar table and use the following measures.

    Num_Open_Tickets =
    VAR d =
        MAX ( 'Calendar'[Date] )
    RETURN
        CALCULATE (
            DISTINCTCOUNT ( Tickets_Volumes[Ticket ID] ),
            Tickets_Volumes[OPEN DATE] = d
        )
    
    Num_Close_Tickets =
    VAR d =
        MAX ( 'Calendar'[Date] )
    RETURN
        CALCULATE (
            DISTINCTCOUNT ( Tickets_Volumes[Ticket ID] ),
            Tickets_Volumes[CLOSE DATE] = d
        )