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 August 31st. Request your voucher.
Why do i get different result on adding and removing the calculate in the Variable First. Which is the correct one when i want to compute the sales amount of first day of sales of the product
Hi @Cyriackpazhe ,
We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra.
Hi @Cyriackpazhe ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Thanks and Regards,
Chaithra E.
Hi @Cyriackpazhe ,
We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra.
CALCULATE forces context transition. SUMX is an iterator which introduces a row context over the Products table, but the row context will not affect the filter context, so when you are getting the min sales date without CALCULATE you are getting the min sales date of all products, so the first ever sale.
When CALCULATE performs context transition the row context from the Products table is turned into a filter context, which means that the sales table is filtered to only sales for that individual product. At that point the min sales date is the first sale date for that specific product.
It shows the one with calculate yields the correct result
User | Count |
---|---|
26 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |