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 everyone,
I am new using Power Bi Desktop and am struggling with something...
I have imported a database from SQL table :
Each line corresponds to the detection of a car 1way/ car 2nd way/bike/truck/pedestrians
I am now trying to display the average number of total cars+trucks, filtered by day, filtered by zone (cameraID).
The idea would be to display an "average number of cars+trucks per day in february in zone 4" for example.
I tryed using the group by function to make a new table with merged dates but can't make it work because of the differences between zones and type of detection.
Any idea how to solve this problem please ?
Kind regards,
Antoine
Solved! Go to Solution.
So, use slicers for what you want to filter on. Then you need a Date column with Date and no timestamp or Date and the same timestamp. Then you should be able to use SUMMARIZE like:
Average Measure =
VAR __Table =
SUMMARIZE(
'Table',
[Date no Timestamp],
"Count",COUNTROWS('Table')
)
RETURN
AVERAGEX(__Table,[Count])
So, use slicers for what you want to filter on. Then you need a Date column with Date and no timestamp or Date and the same timestamp. Then you should be able to use SUMMARIZE like:
Average Measure =
VAR __Table =
SUMMARIZE(
'Table',
[Date no Timestamp],
"Count",COUNTROWS('Table')
)
RETURN
AVERAGEX(__Table,[Count])
It works ! Thanks very much for your help 🙂
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |