Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
User | Count |
---|---|
140 | |
113 | |
104 | |
76 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |