Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.