This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello,
I would like to ask for some help.
I have 2 view from sql server. The first view collects all the delivery documents (product, date, quantity, store, price), and the other collects all the sales with the same columns.
Delivery view has 2,5 million record, Sales view has 18 million record.
For each sales row, i have to find the closest delivery price. I created a new colum in the sales view with the following formula
Solved! Go to Solution.
HI @Akos07,
I think they should be more related to your data amounts. The iterate calculation through two table with huge amount of records may cause the performance issues. (the total calculation amount= TableA row count * TabeB row count)
In addition, you can also try to use the following formulas if they help:
measure version:
CurrentDeliveryPriceGross =
VAR currdate =
MAX ( view_PBI_BTK_Sales[date] )
RETURN
CALCULATE (
MAX ( view_PBI_BTK_Delivery[price] ),
FILTER (
ALLSELECTED ( view_PBI_BTK_Delivery ),
[date] <= currdate
),
VALUES ( view_PBI_BTK_Sales[storeid] ),
VALUES ( view_PBI_BTK_Sales[CikkCsomEgysegId] )
)
Calculate column version:
CurrentDeliveryPriceGross =
CALCULATE (
MAX ( view_PBI_BTK_Delivery[price] ),
FILTER (
view_PBI_BTK_Delivery,
[storeid] = EARLIER ( view_PBI_BTK_Sales[storeid] )
&& CikkCsomEgysegId = EARLIER ( view_PBI_BTK_Sales[CikkCsomEgysegId] )
&& [date] <= EARLIER ( view_PBI_BTK_Sales[date] )
)
)
Regards,
Xiaoxin Sheng
Thank you, i found a workround, i added the column in the a view, BI just import the data, and now its working.
HI @Akos07,
I think they should be more related to your data amounts. The iterate calculation through two table with huge amount of records may cause the performance issues. (the total calculation amount= TableA row count * TabeB row count)
In addition, you can also try to use the following formulas if they help:
measure version:
CurrentDeliveryPriceGross =
VAR currdate =
MAX ( view_PBI_BTK_Sales[date] )
RETURN
CALCULATE (
MAX ( view_PBI_BTK_Delivery[price] ),
FILTER (
ALLSELECTED ( view_PBI_BTK_Delivery ),
[date] <= currdate
),
VALUES ( view_PBI_BTK_Sales[storeid] ),
VALUES ( view_PBI_BTK_Sales[CikkCsomEgysegId] )
)
Calculate column version:
CurrentDeliveryPriceGross =
CALCULATE (
MAX ( view_PBI_BTK_Delivery[price] ),
FILTER (
view_PBI_BTK_Delivery,
[storeid] = EARLIER ( view_PBI_BTK_Sales[storeid] )
&& CikkCsomEgysegId = EARLIER ( view_PBI_BTK_Sales[CikkCsomEgysegId] )
&& [date] <= EARLIER ( view_PBI_BTK_Sales[date] )
)
)
Regards,
Xiaoxin Sheng
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 33 | |
| 25 | |
| 23 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 41 | |
| 27 | |
| 22 | |
| 22 |