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
Anonymous
Not applicable

[DAX] Get count by item

Hello,

 

I'm trying to create a DAX measure I thought easy but I can't get what I want, so I'm asking to you 🙂

 

Here's my model :

modelcarrep.PNG

 

IT2GARANGRG from garages_experts references NUMAGI from garages_evaluations and PlanetGAR from satelites_experts.

 

What I'd like to get is the number of satelites by an IT2GARANGRG value.

 

This measure will be used in the following table, with fields coming from garages_evaluations (it's ok and normal if we get the same value for each period, if there is no one selected) :

 

carresult.PNG

 

Do you have an idea to do this ?

 

Thank you.

 

Tus

2 REPLIES 2
v-danhe-msft
Employee
Employee

Hi @Anonymous,

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-danhe-msft
Employee
Employee

Hi @Anonymous,

Could you mean to count the row that the value in [IT2GARANGRG] equal to the value in [NUMAGI]? If so, you could refer to below measure:

Count = CALCULATE(COUNT(garages_experts[IT2GARANGRG]),FILTER('garages_evaluations','garages_evaluations'[NUMAGI]=CALCULATE(SUM('garages_experts'[IT2GARANGRG]))))

A.PNG

If I misunderstood you, could you please offer me more information about your data structure or share your pbix file if possible?

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/9thr4hc0baszzjc/%5BDAX%5D%20Get%20count%20by%20item.pbix?dl=0

 

Regards, 

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.