Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I have two tables, I have a diferents lits of discounts in text format in the table01, similar to:
Commercial Discount
CEO discount
BP discount
In the table 02 i have a lot of products with discounts, name, description, company, etc
I create a mesure with this formular:
Total Commercial Discount = -CALCULATE(SUM(Detail[Total COST] );TREATAS({("Commercial Discount")}; 'Detail'[Column1]))
It works, the measure show the sum all Total Cost when in the table02.Column1 i have this text "Commercial Discount"
I like create a table with this sum creating a new colum with the Total COST related to the table01
Any idea?
thanking in advance
Solved! Go to Solution.
Hi @ASB,
Based on my test, the formula below should work in your scenario. ![]()
Column2 =
- CALCULATE (
SUM ( Detail[Total COST] );
FILTER(ALL(Detail);Detail[Column3]=EARLIER(Table01[Column1])
))
Regards
Hi @ASB,
If I understand you correctly, you should be able to use the formula below to add a calculate column in table01 in this scenario. ![]()
Column2 =
- CALCULATE (
SUM ( Detail[Total COST] );
TREATAS ( { ( EARLIER ( 'table01'[Column1] ) ) }; 'Detail'[Column1] )
)
Regards
Hello @v-ljerr-msft
thanks for your reply but it is not working, check the details:
could you help me please?
thanking in advance
regards
Hi @ASB,
Based on my test, the formula below should work in your scenario. ![]()
Column2 =
- CALCULATE (
SUM ( Detail[Total COST] );
FILTER(ALL(Detail);Detail[Column3]=EARLIER(Table01[Column1])
))
Regards
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |