The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I need to know how to build a measure that allows me to know how many times an ID appears in another column (specifically, column "BOSS").
Measure should drop John: 2, because he is the boss of Andy and Tom
Solved! Go to Solution.
@stalkerwolf2033
Create the following measure and apply
ID Count in Boss =
VAR __ID = SELECTEDVALUE(Table1[ID])
RETURN
CALCULATE(
COUNTA( Table1[BOSS] ),
Table1[BOSS] = __ID,
REMOVEFILTERS(Table1)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi @stalkerwolf2033,
May I know whether you have solved this issue? If you still have problems on it, could you please let me know whether there is any other table in your model and how you create relationships for these tables? In addition, how you create your visual? Thanks in advance!
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
@stalkerwolf2033
Create the following measure and apply
ID Count in Boss =
VAR __ID = SELECTEDVALUE(Table1[ID])
RETURN
CALCULATE(
COUNTA( Table1[BOSS] ),
Table1[BOSS] = __ID,
REMOVEFILTERS(Table1)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi! I tried this but it returns the same number for all columns
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |