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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I want to calculate how many postcodes are from the same Area Code. I've tried to use a calculated column with this but it doesn't work:
Occurrences = CALCULATE( COUNT([AreaCode]); FILTER(Area; [AreaCode] = EARLIER('Area'[AreaCode])))
To give an example: I want to calculate how many orders are from SE6 or another area.
Solved! Go to Solution.
Solved:
Occurrences = CALCULATE(
COUNT(
LocationandStoreType[AreaCode]
),
FILTER(
LocationandStoreType,
LocationandStoreType[AreaCode]=EARLIER(LocationandStoreType[AreaCode])
)
)
Solved:
Occurrences = CALCULATE(
COUNT(
LocationandStoreType[AreaCode]
),
FILTER(
LocationandStoreType,
LocationandStoreType[AreaCode]=EARLIER(LocationandStoreType[AreaCode])
)
)
User | Count |
---|---|
14 | |
10 | |
7 | |
6 | |
5 |
User | Count |
---|---|
30 | |
19 | |
12 | |
7 | |
5 |