Forum Discussion
Counting filtered data (AND filter)
- 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.
Is your data only with the table you have show, or are there any other tables?
Be aware that measures are calculated based on context, meaning that any filters, slicers, visualizations settnigs, measure setup can influence the final result.
Do you have any other filtering applied on the report?
You refer that you have a slicer for the service person correct? how is that setup? maybe it's influencing the result of the second measure.
Hi MFelix
There is only one table.
The matrix looks like this ("CPR" = PersionID, "Indsats Navn" = Service, columns are year, quarter, week number - "Borger Navn" is the Person's name and "Leverandør" is the provider, but neither of those should have an influence on the results)
There are 5 slicers on the page, but I have disabled them all. There are no filters.
Which makes the (Empty) result in the card just all the more strange...
- MFelix6 years agoSuper User
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.