Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
tatees
Frequent Visitor

Date slicer not updating Avg time

Hi All,

I have below tables connected with each other

tatees_0-1711416320246.png

I want to show, number of W Queries and Avg Time W queries column for each employee.

number of W queries & Avg time W queries are coming accurately. but when I move date slicer it doesn't update Av time W queries column. It only updates No of W queries. 

 

Date slicer is connected with Queries table Date column.

 

How to get this working?

 

Appreciate any help with this.

 

tatees_1-1711416467144.png

 

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @tatees ,

 

You can create a measure instead of a calculated column.

This is my model relationship.

vtangjiemsft_0-1711698489970.png

vtangjiemsft_1-1711698534566.png

Use the [Date] of the date table as the value of the slicer. This measure changes when the slicer is slid.

vtangjiemsft_2-1711698552402.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. Thank you.

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

6 REPLIES 6
v-tangjie-msft
Community Support
Community Support

Hi @tatees ,

 

You can create a measure instead of a calculated column.

This is my model relationship.

vtangjiemsft_0-1711698489970.png

vtangjiemsft_1-1711698534566.png

Use the [Date] of the date table as the value of the slicer. This measure changes when the slicer is slid.

vtangjiemsft_2-1711698552402.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. Thank you.

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Wilson_
Memorable Member
Memorable Member

tatees,

 

Can you please share how you're calculating the two columns?

30_No.OfWQueries =
CALCULATE(
    COUNTROWS(Queries)
 
31_Av.TimeWQueries =
VAR TotalDurationMinutes =
CALCULATE(
    SUM('Timesheet (Queries)'[new_durationminsonly])
)

VAR TotalDurationHours =
TotalDurationMinutes/60

VAR NumberOfJobs =
CALCULATE(
    DISTINCTCOUNT('Timesheet (Queries)'[ssw_jobid])
)

VAR AvTimeWQueries =
TotalDurationHours/NumberOfJobs

RETURN
AvTimeWQueries

tatees,

 

I'm guessing the Date slicer on the page is using the Date field from the Queries table? There's no relationship between your Date Table and Queries, but it's the measure using the Queries table that updates when you change the date slicer.

 

In that case, you need a relationship between Date Table and Queries, and to use the Date field from the Date Table in your slicer.

 

If that's not the issue, can you please share a sample pbix file? (If you don't know how, please check the pinned thread in the forum.) It would make debugging your issue easier. 🙂


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

Thanks Wilson,

I tried creating relationship between date table and queries, but that doesn't work. 

Due to client live data, I cannot share pbix file unfortunately. 

 

Many thanks 

tatees,

 

Understandable, but if you can't share a pbix, you're going to have to give feedback that's way more helpful than "doesn't work". 🙂

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.