Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have tried making a measure to calculate my net new clients from the last month (outputing a 1 if the earliest open date was within the month preceding the month selected in a slicer). Here is my current dax measure
DYNAMIC Client net new =
VAR SelectedDate = MAX(dimCalendar[Date])
VAR YearSelected = YEAR(SelectedDate)
VAR MonthSelected = MONTH(SelectedDate)
VAR StartOfLastMonth = IF(
MonthSelected = 1,
DATE(YearSelected - 1, 12, 1),
EOMONTH(SelectedDate, -2) + 1
)
VAR EndOfLastMonth = IF(
MonthSelected = 1,
EOMONTH(DATE(YearSelected - 1, 12, 1), 0),
EOMONTH(SelectedDate, -1)
)
RETURN
IF(
NOT ISBLANK(SelectedDate),
SUMX(
FILTER(
dimCurrentMatter,
CONTAINSSTRING(dimCurrentMatter[MatterNumber], "00001") &&
dimCurrentMatter[OpenDate] >= StartOfLastMonth &&
dimCurrentMatter[OpenDate] <= EndOfLastMonth &&
YEAR(dimCurrentMatter[OpenDate]) = if(MonthSelected=1,YEAR(TODAY())-1, YEAR(TODAY()))
),
1
),
BLANK()
)
It is giving me the accurate number but when I try to add the measure to a matrix, it gives the exact same number for each row and a total of the same number as well. I tried using the summarize function, addcoluns instead of sumx, calculate, etc. I can get the accurate number multiple different ways but it never sticks when in a visual.
Solved! Go to Solution.
@GabFort So typically this indicates a missing relationship between 2 tables.
@GabFort So typically this indicates a missing relationship between 2 tables.
Is there a way to workaround that at all ? I'm working with a dataset I cannot change and there is indeed not a direct relationship between the table where the opendate is found and the table where the office is found.
@GabFort Possibly. You could grab the MAX of the office or office ID or whatever. You would need something in your fact table that specified what office was involved. You would then add an additional clause to your FILTER statement ( && ).
That's about as specific as I can get without more information.
Fair ! I cannot add anything to the fact tables used in the model so will need to speak to the model owner before making further progress. Thank you for your answer.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |