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.
Hello all
This forum helped me get a dynamic column working, counting the number of times a date shows (representing an activity) 😍
Now I need to create a new column specific to each region, counting the date frequency again, but only if "Melbourne" is the Region. I tried an 'if' statement, which resulted in only the Melbourne rows triggering a count. However, the result still counted from all rows, so I don't have the filtering right. Can you assist?
So in the FreqPerDay_MELB column, only the rows where Melbourne is listed trigger a count, and the count only includes dates with Melbourne as the region.
Solved! Go to Solution.
I fixed it ... a small change and its working
-
Dear Collis,
To achieve this, you can add a filter specifically for "Melbourne" in your CALCULATE function. This will limit the count to only rows where the region is "Melbourne". You can achieve this by using a filter within the CALCULATE function. Here’s how to modify your formula:
FreqPerDay_MELB =
CALCULATE(
COUNT(ActiveDaysCount[DatesActive]),
ALLEXCEPT(ActiveDaysCount, ActiveDaysCount[DatesActive]),
ActiveDaysCount[Region] = "Melbourne"
)
Note:
The ALLEXCEPT function clears all filters except for the date column, allowing the formula to count all instances of each date, but only within the context of any specified filters, like the region. The filter ActiveDaysCount[Region] = "Melbourne" then ensures that the calculation is restricted to rows where the region is specifically "Melbourne." This setup will make the FreqPerDay_MELB column count only the dates associated with "Melbourne."
Thanks - its not quite working, but nearly there!
Looking at the below. I think it's calculating the correct number of activities on a date in Melbourne e.g. 2 on 1/02/2024, as shown below, but it's listing the two in every row for that date, instead of just the Melbourne lines. The other rows for that date that aren't in Melbourne need to be blank.
I really appreciate your post.