Forum Discussion
[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 :
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) :
Do you have an idea to do this ?
Thank you.
Tus
2 Replies
- v-danhe-msft
Microsoft 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]))))
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
- v-danhe-msft
Microsoft 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