Forum Discussion
measure summary
I have created a MEASURE which I am using on a Matrix table sorted by Sales Reps & Date:
# Deals = calculate(COUNTROWS('Opportunity'),
FILTER('Opportunity','Opportunity'[Omit__c] = FALSE()),
FILTER('Opportunity','Opportunity'[ForecastCategory] <> "Omitted"),
FILTER('Opportunity','Opportunity'[StageName] <> "Closed Won"),
FILTER('Opportunity', 'Opportunity'[First_Day_Close_Date__c] = sum(Quota[Month_Year__c])))
The number that calculates displays correctly. However, it does not add it up at the end.
I assumed because there are rows with "null".
Any help would be appreciated! Thanks!
Here you go. Mind you enclosed solution involves adding a date table, creating the relationships and modifying measures.
15 Replies
- v-huizhn-msft
Microsoft Employee
Hi kchan002,
Please add 0 in your formula as follows and check if ot works fine.Deals = calculate(COUNTROWS('Opportunity'), FILTER('Opportunity','Opportunity'[Omit__c] = FALSE()), FILTER('Opportunity','Opportunity'[ForecastCategory] <> "Omitted"), FILTER('Opportunity','Opportunity'[StageName] <> "Closed Won"), FILTER('Opportunity', 'Opportunity'[First_Day_Close_Date__c] = sum(Quota[Month_Year__c])))+0
Best Regards,
Angelia- kchan002Frequent Visitor
Hi,
It seems that it takes care of the null values and places a "0".
However, the Total still says 0.
Deals
Sales Rep 1 10
Sales Rep 2 0
Sales Rep 3 0
0
- Zubair_Muhammad
Community Champion
Try adding this MEASURE.
DealsWithTotal = IF ( HASONEVALUE ( TableName[Name_c] ), [# Deals], SUMX ( ALLSELECTED ( TableName[Name_c] ), [# Deals] ) )
- PaulDBrown
Community Champion
Try with:
total # deals = SUMX (SUMMARIZE(‘TableName’, ‘TableName’ (Month), [# Deals])
see if that works.
regards,
Paul.
- kchan002Frequent Visitor
Tried the measure - now it adds up the row, but not the column.
January February March.... Total
Sales Rep 1 1 2 0 3
Sales Rep 2 1 0 0 1
Total 0 0 0
Is there a way to do both?
- PaulDBrown
Community Champion
- Thyago_Rezende
Resolver I
Hi,
Try to do this:
SUMX(Opportunity,
calculate(COUNTROWS('Opportunity'),
FILTER('Opportunity','Opportunity'[Omit__c] = FALSE()),
FILTER('Opportunity','Opportunity'[ForecastCategory] <> "Omitted"),
FILTER('Opportunity','Opportunity'[StageName] <> "Closed Won"),
FILTER('Opportunity', 'Opportunity'[First_Day_Close_Date__c] = sum(Quota[Month_Year__c]))))