Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi guys
I have 2 tables. They are related through the Task column
i need to write a calculated column that gives me a count of each task. Seems simple but the part that's tripping me up is if the task is task 3 or 4 then I need the count of those together in the calculated column. The one I wrote doesn't add them together. Here is an example table and my desired result. Thanks!
| Name | Task |
| John | 1 |
| John | 1 |
| John | 2 |
| Jim | 1 |
| Jim | 2 |
| Jane | 1 |
| Jane | 2 |
| Mike | 3 |
| Mike | 4 |
| Evan | 3 |
| Evan | 4 |
desired result
| Task | Calculated column count |
| 1 | 4 |
| 2 | 3 |
| 3 | 4 |
| 4 | 4 |
@Bpark1994 , Try a measure like
Measure 2 = if( max('Table'[Task]) in {3,4} ,CALCULATE(COUNT('Table'[Name]), 'Table'[Task] in {3,4}), COUNT('Table'[Name]))
@Bpark1994 , I think one table is missing. This how you can get new column in table 2 from tbale
Countx(filter(Table1, Table2[Task] =Table1[Task]),Table1[Name])
The above one can also done using measure with task
count(Table1[Name])
Sorry this is not the desired result I am looking for. I don't just want to count the tasks, I also need conditional logic that adds tasks 3 and 4 together as described above. I appreciate the help though!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 14 |