Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello team,
I am looking for a DAX formula that allows me, when a product is selected, to return the number of profiles working or assigned to this product.
Thank you in advance for your help.
Bill
Usine | Produit | Profil | Data |
BOULOGNE | Velo | Cloud Architect | 18 |
BOULOGNE | Velo | DevSecOps | 270,9 |
BOULOGNE | Car | Engineering | 27 |
BOULOGNE | Bike | Lead Dev | 72 |
BOULOGNE | Car | Product Owner | 57 |
BOULOGNE | Vélo | Manager | 9 |
BOULOGNE | Bike | UX/UI | 72 |
BOULOGNE | moto | Expert | 54 |
Solved! Go to Solution.
The aim is to provide statistics on the number of engineers, technicians, experts, etc. assigned to each product manufactured.
My table is indeed clear, but what if you had a thousand products? The display won't be pretty on a graph, which is why I want to use a DAX.
I tested your formula and it didn't work. However, I modified @amitchandak's formula and it worked:
Count of Profiles = CALCULATE(DISTINCTCOUNT('Planned load'[Profile]),ALLSELECTED('Planned load'[Product]))
Thanks for your feedback.
The aim is to provide statistics on the number of engineers, technicians, experts, etc. assigned to each product manufactured.
My table is indeed clear, but what if you had a thousand products? The display won't be pretty on a graph, which is why I want to use a DAX.
I tested your formula and it didn't work. However, I modified @amitchandak's formula and it worked:
Count of Profiles = CALCULATE(DISTINCTCOUNT('Planned load'[Profile]),ALLSELECTED('Planned load'[Product]))
Thanks for your feedback.
@Bill252 , I think simple measure should do
DISTINCTCOUNT(ProfilesData[Profil])
Plot with Profil
or try
Count of Profiles =
CALCULATE(
DISTINCTCOUNT(ProfilesData[Profil]),
ALLSELECTED(ProfilesData)
)
Hello @amitchandak , fFirst of all, thank you for your feedback.
However, my table call "Planned load". It has 5 columns:
1. Plant (Usine) ; 2. Product (Produit) ; 3. Profile (Profil) ; 4. Value (data); 5. Date
I've tested several formulas but they don't return what I want, for example :
Number of profils = COUNTROWS(FILTER('Planned load', 'Planned load'[Profile] = SELECTEDVALUE('Planned load[Products])))
or
Number of profils = CALCULATE(COUNT('Planned load'[Profile]), CROSSFILTER ('Planned load'[Products]))
Thank you in advance for your feedback
Bill252
Hello @Bill252,
I am not sure to understand why you want this count since your data are already well shaped so you can display it in any visual.
However, if you still need it for something else maybe you can try :
CALCULATE(COUNTROWS('Planned Load'),FILTER('Planned Load','Planned Load'[Produit]))
Regards
User | Count |
---|---|
82 | |
77 | |
62 | |
60 | |
49 |
User | Count |
---|---|
109 | |
95 | |
86 | |
79 | |
61 |