Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I have 2 tables fEstoque and dCadastroProdutos and the are related many to one.
In fEstoque, i have a column named ULTIMA ATUALIZACAO and another named ULTIMA COMPRA
What DAX formula should i use in order to bring to dCadastroProdutos the ULTIMA COMPRA values, but only the ones that have the text SIM at ULTIMA ATUALIZACAO column
thank you
Solved! Go to Solution.
Hello,
@riadorra, how does your table are structured? Can you show some data? Are the "ULTIMA ATUALIZACAO" "SIM" values unique for an given Product?
For example:
These are the table data:
Like you can notice, for each product there is only one row containing the value "SIM". Am I right?
These are my soltions for both calculated column and measure:
CALCULATE(FIRSTNONBLANK(fEstoque[ULTIMA COMPRA]; 0); fEstoque[ULTIMA ATUALIZACAO] = "SIM")
And this is a table visual:
Since that for Product C there is not a "SIM" valeu on fEstoque, the return value is blank.
But, if your data has more than one "SIM" value for each produtct I will need some more explanation.
Hope it helps!
Hello,
@riadorra, how does your table are structured? Can you show some data? Are the "ULTIMA ATUALIZACAO" "SIM" values unique for an given Product?
For example:
These are the table data:
Like you can notice, for each product there is only one row containing the value "SIM". Am I right?
These are my soltions for both calculated column and measure:
CALCULATE(FIRSTNONBLANK(fEstoque[ULTIMA COMPRA]; 0); fEstoque[ULTIMA ATUALIZACAO] = "SIM")
And this is a table visual:
Since that for Product C there is not a "SIM" valeu on fEstoque, the return value is blank.
But, if your data has more than one "SIM" value for each produtct I will need some more explanation.
Hope it helps!
Hi caaarlos,
yes, there's only 1 "SIM". it worked well.
I've tried another function and it worked too
LOOKUPVALUE(fEstoque[data ultima compra];fEstoque[codigoproduto];dCadastroProdutos[Codnumero];fEstoque[ultima atualizacao];"sim")
Thank you very much
Riad
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
98 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |