Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have a data set of units of equipment. The user enters a start date, an end date, and the Unit Reserved for that job. Powerquery then expands the data to populate a new row for every day that unit will be used:
eg.
5/24/2022 SC-0037
5/25/2022 SC-0038
5/26/2022 SC-0039 etc... Please refer to screenshot below
Because the data entry is manual, I need to know if a particular unit is double booked on a certain date. In excel I would do this:
=COUNTIFS ( C:C , C2 , G:G , G2 )
I've searched for over an hour and I can't figure out how to do the same thing in PowerBI. Please help
Solved! Go to Solution.
Hi @davidoz ,
I'm guessing you want a calculated column. You can build something like this:
CountDuplicates =
VAR _Check = CALCULATE(COUNTROWS(YOUR_TABLE), FILTER(YOUR_TABLE, YOUR_TABLE[Date] = EARLIER(YOUR_TABLE[Date]) && YOUR_TABLE[UnitReserved] = EARLIER(YOUR_TABLE[UnitReserved])))
RETURN
IF(_Check > 1, 1, 0)
Let me know if that works.
Hi @davidoz ,
I'm guessing you want a calculated column. You can build something like this:
CountDuplicates =
VAR _Check = CALCULATE(COUNTROWS(YOUR_TABLE), FILTER(YOUR_TABLE, YOUR_TABLE[Date] = EARLIER(YOUR_TABLE[Date]) && YOUR_TABLE[UnitReserved] = EARLIER(YOUR_TABLE[UnitReserved])))
RETURN
IF(_Check > 1, 1, 0)
Let me know if that works.
thank you! this worked perfectly!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 52 | |
| 50 | |
| 34 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 94 | |
| 77 | |
| 41 | |
| 26 | |
| 25 |