This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Greetings, community! Hope someone can help me figure out this DAX scenario. I've tried just about everything of which I can think (SUMX, Calculate, SelectedValue, etc.), and can't figure out a solution. It seems like this should be simple, but it is driving me crazy! Let me set the stage with a "simplified" example.
I have a matrix with a date from one table and need to show the total $ in that window of time in another table.
Here's the sample data from the three tables:
And here is the data model:
What I'm hoping to achieve is that, when I single-select slice to a specific category, the matrix will show the total $ that was paid based on each account's Start/End Date range. So, based on the data, New Accounts that had a StartDate in June would show $3000 for New Accounts.
When sliced to Returning Accounts, it would show June with $600 (All Payments for Account #1 >= StartDate 6/21) and August with -$1500.
Does anyone have a brilliant idea or suggestion?
Solved! Go to Solution.
Hi @arpost ,
Measure:
Measure =
VAR _s =
SUMMARIZE (
'DateSummary',
[AcountKey],
[StartDate],
[EndDate],
"amount",
CALCULATE (
SUM ( OrderSummary[Amount] ),
FILTER (
OrderSummary,
[AccountKey] = DateSummary[AcountKey]
&& [TransactionDate] >= [StartDate]
&& IF ( ISBLANK ( [EndDate] ), TRUE (), [TransactionDate] <= [EndDate] )
)
)
)
RETURN
SUMX (
_s,
[amount]
)
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @arpost ,
Measure:
Measure =
VAR _s =
SUMMARIZE (
'DateSummary',
[AcountKey],
[StartDate],
[EndDate],
"amount",
CALCULATE (
SUM ( OrderSummary[Amount] ),
FILTER (
OrderSummary,
[AccountKey] = DateSummary[AcountKey]
&& [TransactionDate] >= [StartDate]
&& IF ( ISBLANK ( [EndDate] ), TRUE (), [TransactionDate] <= [EndDate] )
)
)
)
RETURN
SUMX (
_s,
[amount]
)
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |