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
I am trying to get all ids list from my table which has all the versions and so my below code works perfectly fine if my Id expects 2 versions, here I have hardcoded max = 2 but instead of 2 if I write DistinctCount(Table1[version]) it doesnot seems to be binding.
though I can see DistinctCount(table1[version]) returns the same value.
What wrong am I doing here?? I am trying to use it in matrix visual with Ids in row and version 1 and version 2 as columns
Measure which works fine:
Measure=
var _max= 2
return
countx(filter(summarize(Table, Table[Id], "_1",distinctcount(table[Version])),[_1] ?_max),[Id])
Table is something like this:
| ID | Version |
| 1 | 1 |
| 1 | 2 |
| 2 | 1 |
| 3 | 1 |
| 3 | 2 |
Measure which does not work fine:
Measure=
var _max= DistinctCount(Table1[version])
return
countx(filter(summarize(Table, Table[Id], "_1",distinctcount(table[Version])),[_1] ?_max),[Id])
Solved! Go to Solution.
@Anonymous , Try like
Measure=
var _max= calculate(DistinctCount(table1[version]), allselected(table1))
return
countx(filter(summarize(Table, Table[Id], "_1",distinctcount(table[Version])),[_1] = _max),[Id])
@Anonymous , Try like
Measure=
var _max= calculate(DistinctCount(table1[version]), allselected(table1))
return
countx(filter(summarize(Table, Table[Id], "_1",distinctcount(table[Version])),[_1] = _max),[Id])
You are Super!!!
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!