Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I am working on the CAS score and I would like to do a subtraction of count( category 1) - count( category 2)
| CAS | expected output (count of Promoters- count of detractors) |
| Promoter | 1.00 |
| Promoter | |
| Promoter | |
| Passive | |
| Detractors | |
| Detractors | |
| Passive |
So I have to subtract the count of Promoters - count of detractors . I used calculate or sum function but getting errors . Any help would really appreciate
Solved! Go to Solution.
Hi,
Try these measures
P = calculate(countrows(Data),Data[CAS score category]="Promoter")
D = calculate(countrows(Data),Data[CAS score category]="Detractor")
N = [P]-{d]
N % = divide([N],countrows(Data))
Drag the N % to a card visual.
Hope this helps.
Hi,
Share some data in a format that can be pasted in an MS Excel file and show the expected result.
Hi Ashish,
Sorry I was not clear in my question
my data has customer ID and categories based on the score they gave now I want to do a dax that subtracts the count of DEtractors from count of Promoters as shown in the bar chart I have to show a value that subtracts the promoter - detractor. My graph is from the 500K data put as a bar chart. But the result I want is subtracting the promoter- detractor count.
Hi,
Try these measures
P = calculate(countrows(Data),Data[CAS score category]="Promoter")
D = calculate(countrows(Data),Data[CAS score category]="Detractor")
N = [P]-{d]
N % = divide([N],countrows(Data))
Drag the N % to a card visual.
Hope this helps.
Thank you that worked ...
You are welcome.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.