Forum Discussion

grggmrtn's avatar
grggmrtn
Post Patron
6 years ago
Solved

Counting filtered data (AND filter)

I've created a matrix visual based on this sample data:   PersonID WeekNr Service 1 12 A 1 12 B 1 13 A 1 13 B 1 14 A 1 15 A 2 12 A 2 13 B 2 15 A 2 15 B 2 16 A 2 ...
  • MFelix's avatar
    MFelix
    6 years ago

    Hi grggmrtn ,

     

    this has to do with contex of the measure try the following:

     

    Measure 2 = 
    var temp_table = SUMMARIZE(Data; Data[PersonID];Data[WeekNr]; "@Value";[Measure])
    return
    CALCULATE (
        DISTINCTCOUNT ( Data[PersonID] );
        FILTER(temp_table; [@Value] > 0)
    )

     

    Replace the Data[WeekNr] by the date column, should work as expected.