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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hey there, I came across a problem which I'm not sure how to solve.
I've 4 Columns i.e., Internet, Phone, TV & CustomerID. In first 3 columns, if a user has opted for it then it's a "yes" else it says "no".
Now, I want to count the total number of services a user has opted for.
I'm new to BI & I thought that maybe I'll get some help here.
Solved! Go to Solution.
Hi,
Here is one way to do this:
Data:
Dax:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
This data model is not what PBI likes. Unpivot the 3 columns, so that your table looks like this:
CustomerID | Service | Value
--------------------------------
1 | TV | Yes
1 | Phone | No
1 | Internet | Yes
2 | TV | Yes
2 | Phone | No
....
Once you've got it, then it's dead easy (if you put the CustomerID on rows in a table/matrix visual):
[# Services Opted For] =
calculate(
// You have to decide how you want to
// calculate this statistic when many
// CustomerID's are visible in the
// current context. Here I calculate
// the number of different services
// that at least one customer in the
// current context has opted for.
distinctcount( T[Service] ),
keepfilters( T[Value] = "yes" )
)
Hi,
Here is one way to do this:
Data:
Dax:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!