cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Tusozor Regular Visitor
Regular Visitor

[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 Smiley Happy

 

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
Community Support Team
Community Support Team

Re: [DAX] Get count by item

Hi @Tusozor,

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.
Community Support Team
Community Support Team

Re: [DAX] Get count by item

Hi @Tusozor,

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.