Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi all,
I have the following structure:
Product | Price | Measure1 | Measure2 |
AA | 190 | 1200 | 192 |
AA | 192 | 1300 | 192 |
AA | 193 | 500 | 192 |
AA | 192 | 200 | 192 |
BB | 92 | 300 | 92 |
BB | 94 | 150 | 92 |
I need to create a measure that finds the maximum of Measure1 and then write the right price for it in Measure2 based on Product.
Thank you!
Solved! Go to Solution.
Hi, @MrMP
I am not sure if I understood your question correctly, but please check the below.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Use TOPN to retrieve the price corresponding to the max Measure1. The pattern is as follows,
Measure2 =
MAXX( TOPN( 1, ALL( tbl[Price] ), [Measure1] ), tbl[Price] )
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi, @MrMP
I am not sure if I understood your question correctly, but please check the below.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |