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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

For each row with propagated filter context get AVG for group and calculate diff

Hello guys,

I have issue that I cannot solve 😞

I have following schema

Petr___1-1720134634943.png

 

 

with tables and values

DATE

 

QUEUE

queueIdAppId
11
21
32
42
53
63
74
84
95
105

 

App

AppIDAppName
1App1
2App2
3App3
4App4
5App5

 

RESULTS

 

resultdateIdqueueId
111
322
233
644
1055
2016
627
438
549
9510

 

and my goal is simple I need 2 DAX measures only

 

1) that will ALWAYS calculate AVG for all apps, so if I will split the table by queueID or more columns it will hold always(!) avg value and not avg of row

so NOT THIS

AppNamequeueIdAverage Result
App111
App123
App232
App246
App3510
App3620
App476
App484
App595
App5109

 

BUT THIS (just ignore all additional fields that will splitt Average Result ?

AppNamequeueIdAverage Result
App112
App122
App234
App244
App3515
App3615
App475
App485
App597
App5107

 

is it even possible?


2) DAX I would like to get additional DAX measure that will compare current value with AVG of group

AppNamequeueIdAverage ResultResultDiff
App11211
App1223-1
App23422
App2446-2
App3515105
App361520-5
App4756-1
App48541
App59752
App51079-2

 

Is it possible or not because of data model ? (unfortunatelly I cannot change it )

 

2 REPLIES 2
Anonymous
Not applicable

Hello @Anonymous ,
thanks for reply, but unfortunatelly it seems that DAX AVG causing multiplication 😞

Petr___0-1720205981987.png

otherwise but it seems good, can you help me to debug it ?

 

Anonymous
Not applicable

Hi @Anonymous ,

 

You can try formula like below to create measures:

AvgResultAllApps = 
CALCULATE(
    AVERAGE('results'[result]),
    ALLEXCEPT('queue', 'queue'[AppId])
)
Diff = 
SUMX(
    'results',
    'results'[result] - [AvgResultAllApps]
)

vkongfanfmsft_0-1720147307101.png

Best Regards,
Adamk Kong

 

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

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.