Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
User | Count |
---|---|
100 | |
87 | |
81 | |
76 | |
71 |
User | Count |
---|---|
113 | |
104 | |
100 | |
73 | |
65 |