Forum Discussion
Anonymous
6 years agoNot applicable
Countif in Power BI
Hi all, I have a table in Power BI that has the concat of order number and order line and a total net value assigned for each combination. The problem is that the same combination of order number...
- 6 years ago
Hi Anonymous ,
What amitchandak said is like this:
1. Add an Index column in Power Query Editor.
2. Create a column in Power BI Desktop Data view.
Column = VAR MinIndex = CALCULATE ( MIN ( 'Table'[Index] ), FILTER ( 'Table', 'Table'[Order no] = EARLIER ( 'Table'[Order no] ) && 'Table'[Order line] = EARLIER ( 'Table'[Order line] ) ) ) RETURN IF ( 'Table'[Index] = MinIndex, 'Table'[Value] )BTW, .pbix file attached.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey
Community Support
6 years agoHi Anonymous ,
What amitchandak said is like this:
1. Add an Index column in Power Query Editor.
2. Create a column in Power BI Desktop Data view.
Column =
VAR MinIndex =
CALCULATE (
MIN ( 'Table'[Index] ),
FILTER (
'Table',
'Table'[Order no] = EARLIER ( 'Table'[Order no] )
&& 'Table'[Order line] = EARLIER ( 'Table'[Order line] )
)
)
RETURN
IF ( 'Table'[Index] = MinIndex, 'Table'[Value] )
BTW, .pbix file attached.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
6 years agoNot applicable
Icey thank you SO much for your help. It finally worked!! 🙂