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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
gjelstrup
Helper I
Helper I

Average of data with multible data, sorted by a response date in another column

Dear PowerBI community, 

 

I need your help once again. 

 

I have a powerBI table that contains multible columns. I have visuals where I sort on a button on the visuals page by date where the datetable is related to the created on date. 

Now I need to show a visual that is counting the average for the response time for reply send to the customer on a specific date (red arrow). This is a bit tricky as the front page is sorting via the datetable to the created on date (yellow arrow). 

gjelstrup_0-1688412185098.png

I have created a relation between the date when the response was send and the datetable.  

But my DAX creations are not working well for my measure to be shown on the frontpage. 

Can any of you assist? 

 

needed measure: For each unique ID - header notification number to the right. The expression shall calculate the average responsetime for the first response in workingdays. Each ID, should only be counted once. 

 

gjelstrup_1-1688412479626.pnggjelstrup_2-1688413466266.png

My measure: 

LCG LCG KPI first response (w.days) = calculate(AVERAGEX(DISTINCT('Global Notifications'[Header - Notification Number (N)]), FIRSTNONBLANK('Global Notifications'[LCG KPI First response w.days], 0)))
 
However, now comes the tricky part where it shall calculate the average of all the IDs where there were a first response for example in June (a specific dateinterval, as determined on the visual side as shown above) independent on when the ID was created. 
The below "preset period" link is the description of the dateintervals as shown on the front page. 
('Preset Period'[cal Preset Value]=1), 
 
Below the relationship it needs to use for the calculation of the average value. 
USERELATIONSHIP(DateDim[Date],'Global Notifications'[LCG KPI First response date]))
 
For the above data, I need an average value of 9,20

 

0 REPLIES 0

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.