Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All, This is working:
Avg Paid =
Var PaidAvg =
AVERAGEX (
CALCULATETABLE (
SUMMARIZE (
FILTER ('Transactions', 'Transactions'[isRowFilter] = 1),
'Transactions'[Month],
"TotalPaid", DISTINCTCOUNT ('Transactions'[Group])
),
ALL ('Transactions'[LineItem]),
ALL ('Calendar'[MonthYearLong]),
USERELATIONSHIP ('Calendar'[Date], 'Transactions'[Closed Date])
),
[TotalPaid]
)
RETURN PaidAvg
However
Var PaidAvg =
AVERAGEX (
CALCULATETABLE (
SUMMARIZE (
FILTER ('Transactions', 'Transactions'[isRowFilter] = 1),
'Transactions'[Month],
"TotalPaid", DISTINCTCOUNT('Transactions'[Group])
),
[TotalPaid]<>0,
ALL ('Transactions'[LineItem]),
ALL ('Calendar'[MonthYearLong]),
USERELATIONSHIP ('Calendar'[Date], 'Transactions'[Closed Date])
),
[TotalPaid]
)
RETURN PaidAvg
is given me the error:
The value for 'TotalPaid' cannot be determined. Either the column doesn't exist, or there is no current row for this column.
I do not want to count the Group if the Total of Paid is 0 for that group.
How do I add the higher level filter?
Solved! Go to Solution.
Thanks, I modified your code and this works:
Avg Paid =
AVERAGEX ( FILTER (
CALCULATETABLE (
SUMMARIZE (
FILTER ( 'Transactions', 'Transactions'[isRowFilter] = 1 ),
'Transactions'[Month],
"TotalPaid", DISTINCTCOUNT ( 'Transactions'[Group] )
),
ALL ( 'Transactions'[LineItem] ),
ALL ( 'Calendar'[MonthYearLong] ),
USERELATIONSHIP ( 'Calendar'[Date], 'Transactions'[Closed Date] )
),
[TotalPaid] <> 0 ), [TotalPaid] )
RETURN
PaidAvg
Hi @FPP ,
Please update the formula of your measure [Avg paid] as below and check whether that is what you want...
Avg Paid = VAR _tab = CALCULATETABLE ( SUMMARIZE ( FILTER ( 'Transactions', 'Transactions'[isRowFilter] = 1 ), 'Transactions'[Month], "TotalPaid", DISTINCTCOUNT ( 'Transactions'[Group] ) ), ALL ( 'Transactions'[LineItem] ), ALL ( 'Calendar'[MonthYearLong] ), USERELATIONSHIP ( 'Calendar'[Date], 'Transactions'[Closed Date] ) ) VAR PaidAvg = AVERAGEX ( FILTER ( _tab, [TotalPaid] > 0 ), [TotalPaid] ) RETURN PaidAvg |
If the above one can't help you get the desired result, please provide some sample data in your Transactions table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Thanks, I modified your code and this works:
Avg Paid =
AVERAGEX ( FILTER (
CALCULATETABLE (
SUMMARIZE (
FILTER ( 'Transactions', 'Transactions'[isRowFilter] = 1 ),
'Transactions'[Month],
"TotalPaid", DISTINCTCOUNT ( 'Transactions'[Group] )
),
ALL ( 'Transactions'[LineItem] ),
ALL ( 'Calendar'[MonthYearLong] ),
USERELATIONSHIP ( 'Calendar'[Date], 'Transactions'[Closed Date] )
),
[TotalPaid] <> 0 ), [TotalPaid] )
RETURN
PaidAvg
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
70 | |
43 | |
31 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |