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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.