Countif in power query

aboly8000

Board Regular
Joined
Sep 4, 2019
Messages
59
Hello
How do I execute the following code in Power Query?
Code:
[FONT=monospace]=IF(COUNTIF($B$2:B2,B2)=1,1,0)[/FONT]
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
[h=2]I'm trying to do this in Power Query

1. Excel PivotTable Count Unique Items pre 2013[/h][FONT=&quot]Pre Excel 2013 you need to use a workaround, which is this:[/FONT]


  1. [*=1]Add a helper column to your raw data with a formula that counts a 1 for the first instance of the product, and a zero for any duplicates.
[FONT=&quot]
pivottable_unique_count_2.png
[/FONT]

[FONT=&quot]In cell E2 I entered this formula:[/FONT]
=IF(COUNTIF($B$2:B2,B2)=1,1,0)
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,691
Members
448,978
Latest member
rrauni

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top