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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I tried hard to work with Copilot to come up with the proper measure, but I'm turning to real people for help now.
I have a transactions table:
EpargnantSource_Code DateReport_Date Montant
| C001 | 20 septembre 2024 | 300 | ||||||||
| C001 | 10 octobre 2024 | 200 | ||||||||
| C002 | 15 octobre 2024 | 150 | ||||||||
| C003 | 25 décembre 2024 | 400 | ||||||||
| C001 | 10 novembre 2024 | 250 | ||||||||
| C003 | 15 janvier 2025 | 350
And a telemarketing table listing calls made to those clients:
EpargnantSource_codecreatedon
|
Solved! Go to Solution.
SommeTransactionsApresAppel := //Try this
VAR NbJours =
SELECTEDVALUE('NB_jours_télémarketing'[NB_jours_télémarketing Value], 30)
RETURN
SUMX (
'Télémarketing',
VAR DateAppel = 'Télémarketing'[createdon]
VAR CodeClient = 'Télémarketing'[EpargnantSource_code]
RETURN
CALCULATE (
SUM ( TransactionEpargnant[Montant] ),
FILTER (
TransactionEpargnant,
TransactionEpargnant[EpargnantSource_Code] = CodeClient &&
TransactionEpargnant[DateReport_Date] > DateAppel &&
TransactionEpargnant[DateReport_Date] <= DateAppel + NbJours
)
)
)
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Works great. What did the ,30 add to the selectedvalue ?
It'S basically the default value?
SommeTransactionsApresAppel := //Try this
VAR NbJours =
SELECTEDVALUE('NB_jours_télémarketing'[NB_jours_télémarketing Value], 30)
RETURN
SUMX (
'Télémarketing',
VAR DateAppel = 'Télémarketing'[createdon]
VAR CodeClient = 'Télémarketing'[EpargnantSource_code]
RETURN
CALCULATE (
SUM ( TransactionEpargnant[Montant] ),
FILTER (
TransactionEpargnant,
TransactionEpargnant[EpargnantSource_Code] = CodeClient &&
TransactionEpargnant[DateReport_Date] > DateAppel &&
TransactionEpargnant[DateReport_Date] <= DateAppel + NbJours
)
)
)
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 43 | |
| 41 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 186 | |
| 116 | |
| 95 | |
| 64 | |
| 45 |