Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi,
I'm creating a point in time report which requires a number of Dynamic components. I have the majority of them in the report but I seem to have fallen at the last hurdel. In the Screen shot below, I would like the last column 'TEST 0-30 days' measure to;
Sum "Balance" if "Age Category" = "0-30 days".
I'll break down each step below.
So Point number 5 doesn't seem to work, I also tired the point below and this threw an error.
From a model point of view the only tables relevent to these calculations are the DATE table and Transaction line item. these are linked by Date_Table[Date] to 'Transaction Line Item'[CreatedDate] on a 1:* relationship.
As always any help is greatly aprriciated.
Thanks
Dobby Libr3
Solved! Go to Solution.
SUMX(FILTER('Transaction Line Item','Key Measures'[Age Category]="0-30 days"),[Balance])
?
Hi @Anonymous ,
for these kind of measures, deleting the connection between your date table and the fact table should help.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Row context is very important for measure
TEST 0-30 days = SUMX(summarize('Transaction Line Item','Transaction Line Item'[DocId],"_sum"
if ('Key Measures'[Age Category]="0-30 days",
CALCULATE(SUM('Transaction Line Item'[Balance])),
BLANK()))[_sum]
)
Also, if possible filter on age in the formula, not on the age category
@Anonymous I don't see Key Measures table in your model, what is that and how is it connected? Is Age Category a column or a measure? Is TEST 0-30 days supposed to be a measure or a calculated column? If calculated column what table?
TEST 0-30 days = SUMX('Transaction Line Item',
if ('Key Measures'[Age Category]="0-30 days",
CALCULATE(SUM('Transaction Line Item'[Balance])),
BLANK()))
Hi @Greg_Deckler,
The Key Measure table is just a table where I keep all my measures, its stand alone and doesn't connect to the model.
Age Category is currently a measure because as a colum it doesn't return the correct value.
In an ideal world I would have these all as columns rather than measures,
Thanks
Rob
Or perhaps:
SUMX(
FILTER(
ADDCOLUMS(
'Transaction Line Item',
"__Age Category",'Key Measures'[Age Category]
),
[__Age Category]="0-30 days"
),
[Balance]
)
Hi @Greg_Deckler , @ImkeF and @amitchandak,
Unfortuantly none of those worked! thanks you so much for investing your time in this, I have got a sample PBIX below, is there somthing wrong with my data model maybe?
https://drive.google.com/file/d/1o694rGjYHVia0xpwzq75Dl920fLK4_qC/view?usp=sharing
As always any help is appriciated and never expected!
Thanks
Dobby
Hi @Anonymous ,
for these kind of measures, deleting the connection between your date table and the fact table should help.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Thanks @ImkeF this has worked, I really don't understand why! thanks all for your help
SUMX(FILTER('Transaction Line Item','Key Measures'[Age Category]="0-30 days"),[Balance])
?
Hi @Anonymous
please try the following:
CALCULATE(
SUMX(
VALUES('Transaction Line Item'[Trans Line Item]),
CALCULATE(SUM('Transaction Line Item'[Balance]))),
'Key Measures'[Age Category]="0-30 days")
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @ImkeF
I tried a Calculate column before and I got this error.
"A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed."
This same error appeared when I tired this expression.
Hi @Anonymous
have you tried @amitchandak 's proposal?
Otherwise: Could you please share a sample workbook?
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 56 | |
| 43 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 24 |