Forum Discussion
vjnvinod
Impactful Individual
5 years agoDax Help needed to create a calculated coloumn
Dear Experts, I have a table called Mercury_Extract I need a calculated coloumn (Standard Available Hours) which ignores all repeated lines except one and gives me a output as 40 It should ide...
- 5 years ago
Hi vjnvinod,
Ignore duplicate rows and only output the results for one of them. I have a method here that is worth a try, you need to create an index column first.
In the power query editor-> add column->index column -> close and apply
Then use this formula:
give you 40 = VAR _1 = CALCULATE( MIN( [Index] ), FILTER( 'Mercury_Extract', [Attribute] = EARLIER( Mercury_Extract[Attribute] ) && [Resource GPN] = EARLIER( Mercury_Extract[Resource GPN] ) ) ) RETURN IF( [Index] = _1, 40, 0 )Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vjnvinod
Impactful Individual
5 years agov-chenwuz-msft
Community Support
5 years agoHI vjnvinod ,
Here is my pbix file. Please let me know if you have any questions.