Forum Discussion
Need help regarding DAX
- Anonymous1 year ago
Hi Emranit ,
Thank you for reaching out to the Microsoft Fabric Community Forum about the issue you are encountering.
Based on my understanding, the following DAX measure might help you address the query:
Dyelot Per Machine = VAR TotalDyelot = 11
DIVIDE(TotalDyelot, SELECTEDVALUE('Machines'[Machine Count]), BLANK())
To get the divided result on top of the bar of each value machine, select a clustered column chart :- Use Machine Weight (kg) as the X-axis
- Use Machine Count as the Y-axis
Display the Dyelot per Machine (new measure) as data labels on top of each bar. To enable data labels:
- Click on the chart ,select Format then turn on Data Labels
- Set labels to show Dyelot Per Machine value
Refer the attached file for more clarification.
If this post helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly. - Anonymous1 year ago
Hi Emranit ,
Thanks for your follow-up! Based on your request, you may use the following DAX formula to calculate the average number of machines by dividing the total selected machines by the unique machine count:
new Average_Machines =VAR TotalMachines = COUNTROWS(ALLSELECTED('Machine'))VAR UniqueMachines = CALCULATE(DISTINCTCOUNT('Machine'[Machine Info]), ALLSELECTED('Machine'))
RETURNDIVIDE(TotalMachines, UniqueMachines, 0)
For better understanding, I have created a new measure to get the average value.Please refer the below screenshot for clear understanding.You can either modify your existing card measure or create a new measure using this formula to get the average as needed. Let me know if you need any further adjustments!
I hope this helps.Thank you for your cooperation. Have a great day.
Regards,
Pallavi.
Please provide ma a DAX that always divided with Dyelot quantity and Machine selection quantity as the attached image.
There are marked with a box in the image, It's good. It''s count dyelot quantity and selection number Machine. Now my needs a dax that will be the divided output like 3.5. Please help me.
Hi Emranit ,
Thanks for your follow-up! Based on your request, you may use the following DAX formula to calculate the average number of machines by dividing the total selected machines by the unique machine count:
For better understanding, I have created a new measure to get the average value.Please refer the below screenshot for clear understanding.
You can either modify your existing card measure or create a new measure using this formula to get the average as needed. Let me know if you need any further adjustments!
I hope this helps.Thank you for your cooperation. Have a great day.
Regards,
Pallavi.