Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
In a learning mode, can't find a solution for this example (simplified). Thank you for your tip.
to column "Index W":
- I need to MATCH the nearest greater value from "Weight B" for each evaluated row value of "Age A"
- then I need to write the value of "Weight A" matched
In Excel it is easy done by:
OFFSET(A1, MATCH(Age A, Age B , 1 ), 1)
Sample:
Age A | Weight A | Age B | Index W |
1.0 | 10 | 1.1 | |
1.2 | 20 | 3.2 | |
3.6 | 30 | 3.7 |
Expected result:
Age A | Weight A | Age B | Index W |
1.0 | 10 | 1.1 | 20 |
1.2 | 20 | 3.2 | 30 |
3.6 | 30 | 3.7 | blank |
Solved! Go to Solution.
Index W =
MAXX(
TOPN(
1,
FILTER( DATA, DATA[Age B] > EARLIER( DATA[Age B] ) ),
DATA[Age A], ASC
),
DATA[Weight A]
)
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! |
Thx gents for the advice.
Index W =
MAXX(
TOPN(
1,
FILTER( DATA, DATA[Age B] > EARLIER( DATA[Age B] ) ),
DATA[Age A], ASC
),
DATA[Weight A]
)
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,
The below is for creating a calculated column.
Index W CC =
VAR _ageB = Data[Age B]
VAR _condition =
MINX ( FILTER ( Data, Data[Age A] > _ageB ), Data[Age A] )
RETURN
CALCULATE ( SUM ( Data[Weight A] ), FILTER ( Data, Data[Age A] = _condition ) )
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.
Schedule a short Teams meeting to discuss your question.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |