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.
Hi, I am trying to create a calculated column which will populate measure values only for the maximum index per ID. I'm able to achieve the same functionality using a measure. While creating a calculated column with similar logic, the value gets populated for few more rows than expected.
The measure I have used in calculated column and measure
The intermediate measure to calculate max index
The measure which gives expected output
The calculated column dax
Please help me understand why it is giving additional values and how can I fix it.
This is the power bi file
https://drive.google.com/file/d/1pwRRbnEdAHq_8_rAxqlJnCaPhSNjKkfU/view?usp=sharing
Solved! Go to Solution.
HI @gsraje,
You can use following DAX formula to achieve your requirement:
Max Value Single col 2 =
IF (
Sheet1[Index]
= MAXX ( FILTER ( Sheet1, [ID] = EARLIER ( Sheet1[ID] ) ), [Index] ),
MAXX ( FILTER ( Sheet1, [ID] = EARLIER ( Sheet1[ID] ) ), [Value] )
)
Regards,
Xiaoxin Sheng
HI @gsraje,
You can use following DAX formula to achieve your requirement:
Max Value Single col 2 =
IF (
Sheet1[Index]
= MAXX ( FILTER ( Sheet1, [ID] = EARLIER ( Sheet1[ID] ) ), [Index] ),
MAXX ( FILTER ( Sheet1, [ID] = EARLIER ( Sheet1[ID] ) ), [Value] )
)
Regards,
Xiaoxin Sheng
Hi @v-shex-msft ,
This formula works fine if there are no filters applied. But if I apply filters, it gives blank values in certain cases. Still, thank you so much for the help.
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 |
---|---|
107 | |
94 | |
77 | |
63 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |