Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello All!
It seems like very easy but I'm having trouble with it. OBS: I'm getting the data by live concection( Importing dataset from power BI online)
The table I have
ID Value
1 5
2 2
1 3
2 6
What I want with the measure
ID Value measure
1 5 4
2 2 5
1 3 4
2 8 5
I tried to use quick measures but It didn't return me te right thing
Best Regards,
Diego
Thank you for the answers,
@parry2k is returning by ID but the average isn't right...
@danextian is returning the right average but it isn't by ID...
I'll look where I can put both answers together to solve this issue.
Thanks,
Best Regards,
Diego
@sirros_iotif you put Id and this new measure in a table view, I expect the result to be correct. Could you share what result you are getting? Why it is not correct?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
This should do it (and should work as a column too)
Measure = CALCULATE ( AVERAGE ( Table1[Value] ), ALLEXCEPT ( Table1, Table1[ID] ) )
@parry2k's solution works too.
But why write so much?
Hello all! The filter by ID is working!
I think I know the problem about that measure that was calculating by ID right... I have page filters that take out some data.
I would have to filter this measure, when I tried to do it, it stop working right.
Exemple of the measure... and my table... ID = sensor The correct answer for .Avg would be 8.625
.Avg = CALCULATE ( AVERAGE ( RealTimeData[intervalo] ); ALLEXCEPT ( RealTimeData; RealTimeData[sensor] ))]
I would like to do something lke this..
.Avg = CALCULATE ( AVERAGE ( RealTimeData[intervalo] ); ALLEXCEPT ( RealTimeData; RealTimeData[sensor] ); FILTER( RealTimeData; RealTimeData[contagem] > 1))
But it returns me...
Sorry anything, @Sean, @parry2k, @danextian
Best Regards,
Diego
I just saw that in the total I have the correct answer!
Someone knows what is the problem?
Thanks,
Diego
Hi @sirros_iot,
Try this:
avg by id =
CALCULATE (
AVERAGEX ( ALL ( 'Table'[ID] ), AVERAGE ( 'Table'[Value] ) ),
ALLEXCEPT ( 'Table', 'Table'[ID] )
)
Proud to be a Super User!
You need to add a measure to something like this
Measure = var m = FIRSTNONBLANK(Table1[id], "")
return CALCULATE(AVERAGE(Table1[value]), FILTER(ALLSELECTED(Table1),m =Table1[id]))
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |