Forum Discussion
kristina-brooly
3 years agoFrequent Visitor
How to sum two distinctcounts?
Theres are 2 measures:
users with sprint = CALCULATE(DISTINCTCOUNTNOBLANK('orders'[user id]), 'orders'[product type] = "sprint")
users with order>0 and sprint = CALCULATE(DISTINCTCOUNTNOBLANK('orders'[user id]),'users'[has sprint]="yes", 'orders'[value EUR]>0)
How to write a sum of these 2 measurs?
users with sprint contains users with order>0 and sprint
Products are separate table. Table orders has 2columns with lookupvalue from Products (product, product type)
The report itself:
| Product | users with sprint | users with order>0 and sprint | users with order>0 and sprint / users with sprint |
| Autowebinar oto | 66 | ||
| 3 luni | 6 | ||
| 3 luni recurent | 9 | ||
| 6 luni | 103 | ||
| 6 luni recurent | 2 | ||
| 9 luni | 21 | ||
| Abdomen Plat | 5702 | 153 | 2,68% |
| Abdomen Plat Avansat & Fund Bombat | 14 | ||
| Abdomen Plat Avansat & Fund Brazilian | 6 | ||
| Abdomen Plat Zero Equipment | 1 | ||
| Anticelulitic | 309 | 16 | 5,18% |
| Anual | 118 | ||
| Anual Prelungire | 27 | ||
| Consultatia Nutritionistului | 1 | ||
| Corp Sculptat | 1887 | 51 | 2,70% |
| Corp Sculptat & Pilates360 | 2 | ||
| Extra Busy | 1587 | 35 | 2,21% |
| Extra Busy 2022 | 168 | ||
| Fund Bombat | 1741 | 86 | 4,94% |
| Fund Bombat 2022 | 3289 | ||
| Fund Bombat X60 | 447 | ||
| Fund Brazilian | 1 | ||
| Lifetime | 2 | ||
| Lunar | 169 | ||
| Lunar recurent | 151 | ||
| Meniu 1 zi | 402 | ||
| Metabolic Detox | 217 | ||
| PDF: Meniu 7 zile | 30 | ||
| Postura Reginei | 113 | 7 | 6,19% |
| Silueta Amazoanei | 703 | 25 | 3,56% |
| Silueta de Invidiat | 1416 | 46 | 3,25% |
Products
| product type | products |
| Oto | Abdomen Plat |
| Program | Abdomen Plat |
| Abonament | Abdomen Plat |
| Sprint | Abdomen Plat |
| Sprint | Abdomen Plat New |
| Sprint | Abdomen Plat New |
| Sprint | Vacuum-Plansa |
| Sprint | Anticelulitic |
| Sprint | Corp Sculptat |
| Sprint | Fund Bombat |
| Sprint | Silueta Amazoanei |
| Sprint | Silueta de Invidiat |
| Sprint | Postura Reginei |
| Sprint | Recuperare după naștere |
| Sprint | Stretching & șpagat |
| Sprint | Yoga |
| Sprint | Zeița Ritmului |
| etc |
2 Replies
- lbendlinSuper User
users with sprint contains users with order>0 and sprintplease indicate if you want these to be counted separately, or if you want to subtract one from the other.
- Ashish_MathurSuper User
Hi,
What problem do you face when you use [measure1]+[measure2]?