Forum Discussion

iddy's avatar
iddy
Frequent Visitor
3 years ago
Solved

Creating summary Table with different filters

Hi All,   I need help in creating some sort of a summary table based on the main table.   I have a data table where it has a list of tickets (incidents) with dates of when it is opened and resolv...
  • v-yueyunzh-msft's avatar
    3 years ago

    Hi , iddy  

    Here are the steps you can refer to :

    (1)This is my test data :

     

    (2)We can click "New Table" to create a table:

     

    Table 2 = var _resolved =VALUES('Table'[week_number_resolved])
    var _opened =VALUES( 'Table'[week_number_opened])
    var _all =DISTINCT( UNION(_opened , _resolved))
    return
    ADDCOLUMNS(_all , "resolved_count" , var _number = [week_number_opened] return CALCULATE(COUNT('Table'[incident_number]) ,TREATAS({_number} , 'Table'[week_number_resolved]  ))  ,"opened_count" ,  var _number = [week_number_opened] return CALCULATE(COUNT('Table'[incident_number]) ,TREATAS({_number} , 'Table'[week_number_opened]  ))    )

     

    (3)Then we can meet your need , tghe result is as follows:

     

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly