The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have 2 tables related. Table A (Maestro de partes) is the dimensional table, where each SKU code (NOPARTE) and brand group (CodMarca) is located. Table B (Liq 3M) is the fact table, stores the transacction at the SKU and date level from each import process in the last 3 months.
I need to calculate the sum of the import costs over the FOB factory price at the brand group level. I also need this value to remain the same whether I disaggregate it per SKU or brand group. Here is the formula I'm using considering the filters I need for this calculation:
This is what I need:
Hi @MarceloH10 ,
According to your description and screenshot, it seems that you want to get the result as shown in below screenshot. But as checked the value of field [NOPARTE] in the table 'Maestro Partes', I can't find any value with 'SKU1','SKU2' and 'SKU3' etc. Is there anything misunderstand in my side?
Best Regards
These are some formula examples that I have already tested:
1.
Factor importacion marca =
VAR costos_filtrados =
CALCULATE(
([Total costos de importacion]/SUM('Query liquidaciones R2'[FOB unit liquid])) + 1,
FILTER(
'Query liquidaciones R2',
'Query liquidaciones R2'[Via transporte] = "2" &&
'Query liquidaciones R2'[Datediff aplicacion] > 0 &&
'Query liquidaciones R2'[Datediff aplicacion] < 4
)
)
RETURN
CALCULATE(
costos_filtrados,
ALL('Query inventarios'),
VALUES('Query inventarios'[CodMarca]),
VALUES('Query inventarios'[Numero de Parte]),
'Query liquidaciones R2'
)
2.
Factor importacion marca =
VAR costos_filtrados =
CALCULATE(
([Total costos de importacion]/SUM('Query liquidaciones R2'[FOB unit liquid])) + 1,
FILTER(
'Query liquidaciones R2',
'Query liquidaciones R2'[Via transporte] = "2" &&
'Query liquidaciones R2'[Datediff aplicacion] > 0 &&
'Query liquidaciones R2'[Datediff aplicacion] < 4
)
)
RETURN
SUMX(
VALUES('Query inventarios'[Numero de parte]),
CALCULATE(
costos_filtrados,
ALL('Query inventarios'),
VALUES('Query inventarios'[CodMarca]),
'Query liquidaciones R2'
)
)
3.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
20 | |
18 | |
17 | |
15 | |
13 |
User | Count |
---|---|
39 | |
32 | |
22 | |
19 | |
18 |