Forum Discussion
help with averaging
Hi I need some help
Each manifest ID appears multiple times in the data, and has multiple event dates and may have multiple different capacities.
I would like to write a measure which
find distnct values in column 1 (Manind), how many times event_date (column 2) appears attached to that distinct Manind, and lastly average of Truck_capacity for each value of distinct Manind.
can you help?
3 Replies
- FrankATCommunity Champion
Hi Anonymous
take a look at the following solution and attached pbix file (below):
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut) - amitchandakSuper User
Anonymous ,
Try like
Count(Table[event_Date])
AverageX(Values(Table[ManInd]), max(Table[truck_capacity]))
AverageX(Summarize(Table, Table[ManInd],"_1", max(Table[truck_capacity])),[_1]) - v-jingzhangCommunity Support
Hi Anonymous , you can also get the count and average easily by changing the aggregate type of the fields as below when you use them in a visualization.
Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.