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.
Hey guys! I'm new at developing Power BI Solutions and need help with some DAX Formula. Here is my case:
I have a graphic that shows the price of an item per time.
I need to return the Latest Date of the lowest price.
I mean, in the example above, that price would be 14,19 and the Latest Date that item was bought with that price was 28/10/2015.
The result should be:
Furthermore, I need to do the same thing with the higher value, wich is R$16.92.
I already tried Quick measure but didn´t work.
Best Regards.
Gustavo
Solved! Go to Solution.
Hi!
The measure below retrieve the date from the lowest price of table displayed.
Measure := VAR MinPrice = MIN ( tbPrice[Price] ) RETURN CALCULATE ( LASTDATE ( tbPrice[DatePrice] ), tbPrice[Price] = MinPrice )
Hey @PietroFarias, thanks for the quick response.
The DAX got me this following error:
"MdxScript(Model) (8, 16) Calculation error in measure 'Movement'[Latest Date of Lower Price]: A date column containing duplicate dates was specified in the call to function 'LASTDATE'. This is not supported.
Hi!
The measure below retrieve the date from the lowest price of table displayed.
Measure := VAR MinPrice = MIN ( tbPrice[Price] ) RETURN CALCULATE ( LASTDATE ( tbPrice[DatePrice] ), tbPrice[Price] = MinPrice )
Hey @PietroFarias, thanks for the quick response.
The DAX got me this following error:
"MdxScript(Model) (8, 16) Calculation error in measure 'Movement'[Latest Date of Lower Price]: A date column containing duplicate dates was specified in the call to function 'LASTDATE'. This is not supported.
@PietroFarias I replaced 'LASTDATE' for 'MAX' so it's working pretty well. Thanks for you help man!
Great!
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 |
---|---|
114 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |