Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Good evening, I have the following question, how can I generate a dax in powerbi desktop that brings me the last FOB cost of the item by supplier, because I need to compare my last purchase price with the new lists to find out if there are price increases or decreases, I hope can you help me thank you very much
Solved! Go to Solution.
Hi @Bebecirux ,
You can create a measure as below to get it, please find the details in the attachment.
Measure =
VAR _selsupplier =
SELECTEDVALUE ( 'Table'[Proveedor] )
VAR _selitem =
SELECTEDVALUE ( 'Table'[Artículo] )
VAR _maxdate =
CALCULATE (
MAX ( 'Table'[Fecha] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Proveedor] = _selsupplier
&& 'Table'[Artículo] = _selitem
)
)
RETURN
CALCULATE (
MAX ( 'Table'[FOB] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Proveedor] = _selsupplier
&& 'Table'[Artículo] = _selitem
&& 'Table'[Fecha] = _maxdate
)
)
Best Regards
Hi @Bebecirux ,
You can create a measure as below to get it, please find the details in the attachment.
Measure =
VAR _selsupplier =
SELECTEDVALUE ( 'Table'[Proveedor] )
VAR _selitem =
SELECTEDVALUE ( 'Table'[Artículo] )
VAR _maxdate =
CALCULATE (
MAX ( 'Table'[Fecha] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Proveedor] = _selsupplier
&& 'Table'[Artículo] = _selitem
)
)
RETURN
CALCULATE (
MAX ( 'Table'[FOB] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Proveedor] = _selsupplier
&& 'Table'[Artículo] = _selitem
&& 'Table'[Fecha] = _maxdate
)
)
Best Regards
pls provide the sample data(not the screenshot) and the expected output
Proud to be a Super User!
Hi @Bebecirux ,
Here is what I think can help you, if I understand you correctly:
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0https://...
If my answer was helpful please give me a Kudos and accept as a Solution.
User | Count |
---|---|
141 | |
70 | |
69 | |
53 | |
52 |
User | Count |
---|---|
208 | |
94 | |
64 | |
60 | |
57 |