Forum Discussion
Calculating Average over Multiple Columns
- 1 year ago
Hi JimKeelan ,
I was able to get the correct output by using a calculated column instead of a measure, as you suggested.
use a Calulated column :Average = VAR NonZeroValues = SELECTCOLUMNS( FILTER( { (Sheet1[LockupLME]), (Sheet1[Lockup2]), (Sheet1[Lockup3]), (Sheet1[Lockup4]), (Sheet1[Lockup5]), (Sheet1[Lockup6]), (Sheet1[Lockup7]), (Sheet1[Lockup8]), (Sheet1[Lockup9]), (Sheet1[Lockup10]), (Sheet1[Lockup11]), (Sheet1[Lockup12]) }, [Value] <> 0 ), "Val", [Value] ) RETURN ROUND(AVERAGEX(NonZeroValues, [Val]), 0)
the expected output :If this answer helped resolve your issue, please consider marking it as the accepted answer. And if you found my response helpful, I'd appreciate it if you could give me kudos.
Thank you!!
Hi JimKeelan ,
I wanted to follow up regarding your request for calculating the average of the Lockup columns while excluding any columns with a value of 0.If you encounter any issues or have further questions about implementing this, please let me know. Additionally, if there have been any recent changes to your model or data sources, sharing those details could help us troubleshoot more effectively.
If your issue has been resolved, I would appreciate it if you could mark the helpful response as Accepted, as it may assist others facing similar challenges.
Thank you for contributing to the Microsoft Fabric Community.
Hi JimKeelan
Just following up on your question about calculate the average of columns.
If you're still exploring options or running into any isuues, feel free to share more details we’d be happy to assist further or suggest possible workarounds.
If your issue has been resolved? it would be great if you could update the thread. If any of the earlier replies helped, please consider marking it as the Accepted Answer so others in the community can benefit as well.
Thanks again for engaging with the Microsoft Fabric Community!