Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
BalaVenuGopal
Resolver I
Resolver I

DAX HELP REQUIRED

Hello all,

 

I am strugelling to get bellwo requirement could you please help me here.

 

1) I have account and contact tables where each account have multiple contacts .Bellow is my required output

 

when i drag account and count of contacts i am getting exact count but when i drag contact also i need same countUntitled.png

 

 

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

 

Try this

 

=CALCULATE(COUNTROWS(Conname),ALL(Con[Conname]))

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur,

 

Thank you for your valuable time but unfortuntely it dint work for me but you are  very closer i guess .

 

I am getting count but conname is repeating lot of times (conname related to remaining accounts also repeatting which i dont requried.

for

acc1 con104  3

acc1 con11    3

acc1 con114  3 

 

this is what i am expecing bellow is the output i am getting from your measure

 

Untitled.png

 

Hi,

 

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hey,

 

Use this :

NumOfProducts = CALCULATE(DISTINCTCOUNT('Sheet1'[Product]),ALLEXCEPT('Sheet1','Sheet1'[Month]))

 

Changs column names Accordingly !!!

 

 

Use this :

NumOfContacts = CALCULATE(DISTINCTCOUNT('Con'[Conname]),ALLEXCEPT('acc','acc'[accid]))

chotu27
Post Patron
Post Patron

@BalaVenuGopal Did you sum it up?

HI @chotu27 ,

 

YES i need sum but i need the same sum vlue wheni drag contact too in the report absically i need to remove filter context of contact

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.