Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi, I want to be able to separate 2024 and 2025 active clients into their own measures, and have 2 lines on the graph for each year. Currently, it is a continuous graph like this
Here is the calculation that gets me the active clients. Some clients are active in multiple months/multiple times, and this gives me the accurate monthly figure, it was not as straightforward as a simple Count:
Solved! Go to Solution.
@RichOB To separate the active clients for 2024 and 2025 into their own measures and have two lines on the graph for each year, you can create two separate measures for each year.
DAX
Active Clients 2024 =
VAR CurrentMonthStart = MIN('Main_Calendar'[Date])
VAR CurrentMonthEnd = MAX('Main_Calendar'[Date])
RETURN
CALCULATE(
COUNTROWS(Table),
Table[Start_date] <= CurrentMonthEnd,
OR(ISBLANK(Table[End_date]), Table[End_Date] >= CurrentMonthStart),
YEAR('Main_Calendar'[Date]) = 2024
)
DAX
Active Clients 2025 =
VAR CurrentMonthStart = MIN('Main_Calendar'[Date])
VAR CurrentMonthEnd = MAX('Main_Calendar'[Date])
RETURN
CALCULATE(
COUNTROWS(Table),
Table[Start_date] <= CurrentMonthEnd,
OR(ISBLANK(Table[End_date]), Table[End_Date] >= CurrentMonthStart),
YEAR('Main_Calendar'[Date]) = 2025
)
Proud to be a Super User! |
|
@RichOB To separate the active clients for 2024 and 2025 into their own measures and have two lines on the graph for each year, you can create two separate measures for each year.
DAX
Active Clients 2024 =
VAR CurrentMonthStart = MIN('Main_Calendar'[Date])
VAR CurrentMonthEnd = MAX('Main_Calendar'[Date])
RETURN
CALCULATE(
COUNTROWS(Table),
Table[Start_date] <= CurrentMonthEnd,
OR(ISBLANK(Table[End_date]), Table[End_Date] >= CurrentMonthStart),
YEAR('Main_Calendar'[Date]) = 2024
)
DAX
Active Clients 2025 =
VAR CurrentMonthStart = MIN('Main_Calendar'[Date])
VAR CurrentMonthEnd = MAX('Main_Calendar'[Date])
RETURN
CALCULATE(
COUNTROWS(Table),
Table[Start_date] <= CurrentMonthEnd,
OR(ISBLANK(Table[End_date]), Table[End_Date] >= CurrentMonthStart),
YEAR('Main_Calendar'[Date]) = 2025
)
Proud to be a Super User! |
|
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 |
|---|---|
| 51 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 84 | |
| 71 | |
| 38 | |
| 29 | |
| 27 |