March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi everbody!
For my project i need to graph prices of different products in an indexed manner (so every line starting from 100). In order to do so, I need to divide each price of each product by the earliest price available for that product.
Then, preferably, i would like to have that if i slice the first date available for a product, that it will take the new first date as the earliest price.
So, my question is, does anybody knows a DAX formula with which i can look for the first date available for each supplier/product combination, then select the price corresponding to this date+supplier+product? And then also pin point that related price (as like $ in Excel) so i can divide all other prices by that earliest price? (In that way i calculate the index)
My dataset looks like follows:
And i would like to show my graph as follows:
Would be very helpful! Thank you in advance!
Kind regards,
Fleur de Clercq
Hi @Fleurdc ,
This is how you can get the earliest price:
Earliest Price by Product by Supplier =
VAR __EARLIEST_DATE =
CALCULATE (
MIN ( 'Table'[Date] ),
ALLEXCEPT ( 'Table', 'Table'[Supplier], 'Table'[Product] )
)
RETURN
CALCULATE (
MAX ( 'Table'[Price] ),
FILTER (
ALL ( 'Table' ),
'Table'[Supplier] = EARLIER ( 'Table'[Supplier] )
&& 'Table'[Product] = EARLIER ( 'Table'[Product] )
&& 'Table'[Date] = __EARLIEST_DATE
)
)
As to the related price, please indicate how to achieve this. Also, moving forward, please post a sample data that we can copy-paste (not an image).
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
120 | |
77 | |
59 | |
53 | |
40 |
User | Count |
---|---|
193 | |
106 | |
88 | |
62 | |
51 |