Forum Discussion
How to count rows ignoring all filters except date filter.
Hello everyone, I'm having difficulty performing a calculation in DAX.
I have a query that shows me all my processed items, if they were approved or rejected and if they were rejected what was the reason for the rejection.
I need to create a matrix with just the rejection reasons and how many items were processed in total, how many were rejected and the percentage of the total per day/week/month.
When I put the measurements I already have, they only count the volume of rejects and the percentage always gives 100%.
How do I create a measure to calculate my total processed items to put in that same matrix?
5 Replies
- mangaus1111
Solution Sage
Hi Anonymous ,
try this
CALCULATE( [YourMeasure], ALLEXCEPT('Calendar','Calendar'[Date] )If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- mangaus1111
Solution Sage
sorry, now it is correctly written
CALCULATE([YourMeasure], ALLEXCEPT('Calendar','Calendar'[Date]) )If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- v-yanjiang-msft
Community Support
Hi Anonymous ,
Have your problem solved by mangaus1111 's solution? Do you need further help?
Best Regards,
Community Support Team _ kalyj - AnonymousNot applicable
Hi mangaus1111 and v-yanjiang-msft , The solution pointed out by mangaus1111 didn't work for me, I think something is missing but I don't know what it is.
#Saved_Items = COUNTROWS(FILTER(Items_Processed, [action_type]="saveItem")) #Rejected_Items = COUNTROWS(FILTER(Items_Processed, [action_type]="rejectItem")) #Items_processed = [#Saved_Items] + [#Rejected_Items] #Test = CALCULATE( [#Items_processed], ALLEXCEPT(Calendar,Calendar[Date],Calendar[Week]) )Above are my measurements, what I want is to display the total Items processed in this table below.
I want the Items processed column to count all the items that were processed, even if this number repeats between the lines of a day/week/month, but it shows the percentage of rejected items.
- v-yanjiang-msft
Community Support
Hi Anonymous ,
Please try to add ALL in the FILTER function.
#Saved_Items = COUNTROWS(FILTER(ALL(Items_Processed), [action_type]="saveItem")) #Rejected_Items = COUNTROWS(FILTER(ALL(Items_Processed), [action_type]="rejectItem")) #Items_processed = [#Saved_Items] + [#Rejected_Items] #Test = CALCULATE( [#Items_processed], ALLEXCEPT(Calendar,Calendar[Date],Calendar[Week]) )Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.