Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi all,
I have a table with every row describing a single quantity of different types of equipment.
Some rows are meant to have a unique item ID code, and I would like to first display all rows of only a certain type of equipment and then make sure that each row of said equipment isn't duplicating any item ID codes.
I'm playing around with using DISTINCT, but so far no luck. Any good ideas of how to tackle this?
Thanks
Solved! Go to Solution.
Hi @abrasington,
In your scenario, did you mean this?
We can create a calculated column to count the number of ItemID based on equipment type group. And if the number is more than 1, obviously there exists duplicate item id.
Count ItemID =
CALCULATE (
COUNT ( equipment[ItemID] ),
ALLEXCEPT ( equipment, equipment[equipment] )
)
And if you want to check a certain type of equipment. You can do this:
Count A1 =
CALCULATE (
COUNT ( equipment[ItemID] ),
FILTER ( equipment, equipment[equipment] = "A1" )
)Thanks,
Xi Jin.
Hi @abrasington,
In your scenario, did you mean this?
We can create a calculated column to count the number of ItemID based on equipment type group. And if the number is more than 1, obviously there exists duplicate item id.
Count ItemID =
CALCULATE (
COUNT ( equipment[ItemID] ),
ALLEXCEPT ( equipment, equipment[equipment] )
)
And if you want to check a certain type of equipment. You can do this:
Count A1 =
CALCULATE (
COUNT ( equipment[ItemID] ),
FILTER ( equipment, equipment[equipment] = "A1" )
)Thanks,
Xi Jin.
My immediate thought is you could create a calculated column that does a count of each row and how often a particular field appears. You could then filter on that number.
Something like
AppearCount = VAR searchStr = [YourField]
RETURN
Calculate(
COUNTROWS('MyTable'),
'MyTable'[YourField] = searchStr
)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 31 | |
| 28 | |
| 24 |