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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a table like this below and I would Like to get only those Ids which has both the version present in Version column. So in below table I would like to get list of IDs or count of Ids which has both version 1 and 2 in here it will be ID 1 and 3. Thanks in Advance!!
| Id | Version |
| 1 | 1 |
| 1 | 2 |
| 2 | 1 |
| 3 | 1 |
| 3 | 2 |
Solved! Go to Solution.
@PoweeeBII, create a measure like the following and use with id in visual
medida :
var _max 2
devolución
countx(filter(summarize(Table, Table[Id], "_1",distinctcount(table[Version])),[_1] ?_max),[Id])
@Anonymous ,
You can make it happen by creating 2 measures:
What is 8 here? I dont need to sum my Ids, i need the list of Ids who has both version
@Anonymous ,
So just switch total off from table property.
can you please explain why you did minus 2 in the second measure
Sorry for the typo. It was equal sign not minus.
Please check again, i am not getting any values
also i see the case you have taken, you have already removed Id 2
I see whats wrong, my version is of text type and not integer, and so is the Id, how do i handle that?
@PoweeeBII, create a measure like the following and use with id in visual
medida :
var _max 2
devolución
countx(filter(summarize(Table, Table[Id], "_1",distinctcount(table[Version])),[_1] ?_max),[Id])
@amitchandak your solution works fine, but my question if my version increases like there are 3 versions possible for any ids and i would like to get ids with all versions, i will write var max= 3 and so on..but instead of hardcodiing if i go fo var max= distinctcount(table1[version]) it does not return the desired result..thogh the value is 2 if i check it seperately for distinctcount(table1[version]) . any clue what is wrong here?? i mean it doesnt seems to be binding with Ids when using in a matrix while with a hard coded value it works fine
Cant I have this as a new column and pass true and false and then do the count. The issue I am seeing here is What if I have version 3 and then i need to check for Ids which has all the 3 version
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |