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.
There are 2 visual as below:
I created the below measure to calculate the average number of days taken from start date to end date per employee, where end date is not blank.
The above measure is working fine in the table visual. But when i select any particular month in the bar graph, the result of average days to close a request is not changing and getting same value for all the month. See the below attached screenshot when i filtered with a selected a particular month.
In the below screeshot, i selected Jan, yet the avg days to close column not getting changed @Fowmy
Solved! Go to Solution.
Your ALLEXCEPT is removing the filter on the Month column which is why it is not changing. A simpler way to write your measure might be
Avg Days to Close =
AVERAGEX (
FILTER (
DATA,
NOT (
ISBLANK ( Data[End Date] )
)
),
DATEDIFF(DATA[Start Date], DATA[End Date], DAY)
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
The ALLEXCEPT in your original measure was removing the filter from the Month column, as you did not specify it. It kept the filter on start date, which is not used in your visual. For this measure, as the Filter on employee name comes from the visual, the only change to the evaluation context needed is the FILTER to avoid blank end dates.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Your ALLEXCEPT is removing the filter on the Month column which is why it is not changing. A simpler way to write your measure might be
Avg Days to Close =
AVERAGEX (
FILTER (
DATA,
NOT (
ISBLANK ( Data[End Date] )
)
),
DATEDIFF(DATA[Start Date], DATA[End Date], DAY)
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypat Thanks for the solution, this worked. I have a query on this, the ALLEXCEPT() function is filtering on employee name in the table visual, as it is filtering data for the employee name and why is it not filtering with the start month
@Anonymous - Where is your Month column coming from? Is it related to your Start Date?
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 |
---|---|
49 | |
26 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |