The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
46 |