The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have a measure similar to this
Calc of = 'TableX'[Number of X] / 1000
Here's the idea:
I have a filter that selects years from 2016-2019. If I select more than one year in the filter the measure above needs to take the average of this and divide it by a thousand. So if the value is 500 for the year 2017 and 200 for the year 2018 the value of the measure should be
Calc of = 350/1000
where 350 is the average of the two numbers. Right now I just get 700/1000. I tried using the AVERAGEX function but it didn't quite work.
Solved! Go to Solution.
It's the old average of an average. Try the following. Always better to use DIVIDE instead of /:
Total Average = AVERAGE( Table1[Value] )
Total Value = Sum( Table1[Value] ) Average = DIVIDE( AVERAGEX( VALUES ( Table1[Year]),[Total Average]), 1000 )
It's the old average of an average. Try the following. Always better to use DIVIDE instead of /:
Total Average = AVERAGE( Table1[Value] )
Total Value = Sum( Table1[Value] ) Average = DIVIDE( AVERAGEX( VALUES ( Table1[Year]),[Total Average]), 1000 )
Hi @Anonymous probably a bad formulation from my part in the initial message but the "table" is actually a measure, so how does one go about it from that point of view?
I used an alternative (perhaps not so elegant) method where I used DISTINCTCOUNT(TableX[Years]) and multplied it with the denominator.
I dont follow 100%. If it works for what you need then thats all that matters 🙂
User | Count |
---|---|
71 | |
64 | |
62 | |
50 | |
28 |
User | Count |
---|---|
117 | |
75 | |
62 | |
55 | |
43 |