Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi
Hope all is well
I am tryting to calcuate a sum of a measure . Is there way that you can treat a mesure like a column and reference it within your sum function for example
Any Help will be greatly appreciated
Cheers!!
Solved! Go to Solution.
Hi @Anonymous ,
Try:
SUMX( VALUES( 'Logs Usage'[username] ) ,[countusername]))If the problem persists,could you share the sample pbix via cloud service like onedrive for business?
Please mask any sensitive data before uploading
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the @amitchandak sorry for being not to clear I am quite new to this. I tired the above So I want to be able to show zero values aswell . The reason behind this I have a username with n coulmn which I have created a measure that calcuates the distinct users in a company that were active within a timeframe and groups it by compnay name. The issue I had was if I was to directly create a sum function based on the username column it will give this error :
That would have been the easiest way , my ideal goal is show compaies with zero active users aswell as the active users. As shown below that is what I want but also in the matrix table to show zero if users were not active within a timeframe. Really sorry if that made no sense .
Hi @Anonymous ,
Try:
SUMX( VALUES( 'Logs Usage'[username] ) ,[countusername]))If the problem persists,could you share the sample pbix via cloud service like onedrive for business?
Please mask any sensitive data before uploading
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@V-lianl-msft Thanks for that that worked , only issue I have now is getting the zero values to appear . Is there a way I can get this logic to work like the same as this logic
Hi @Anonymous ,
Sorry for the late reply
Try
var test = SUMX( VALUES( 'Logs Usage'[username] ) ,[countusername]))
return if(isblank(test),0,test)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.