Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
ZuzanaK
Frequent Visitor

% Movement

Hello,

 

I am trying to create a % movement year on year as on the table below.

 

ZuzanaK_0-1677668447049.png 

The formula from the table is 37% in 2022 is (283-207)/207 = 37%

I have created one measure as below

client_count_current =
CALCULATE (DISTINCTCOUNT(uk_live_campaign[client_name]),
     FILTER (
         ALLSELECTED (calendar_main),
        calendar_main[calendarYear]
             = MAX ('calendar_main'[calendarYear])
     )
 )
 
and another one for previous year
 
client_count_prev_yr =
CALCULATE (DISTINCTCOUNT(uk_live_campaign[client_name]),
     FILTER (
         ALLSELECTED (calendar_main),
        calendar_main[calendarYear]
             = MAX ('calendar_main'[calendarYear]) -1
     )
 )
 
In order to get % movement, I have created measure with the following formula
 
%Movement_client = CALCULATE(SUMx('Key Measures','Key Measures'[client_count_current]) - SUMX('Key Measures','Key Measures'[client_count_prev_yr])) / SUMX('Key Measures','Key Measures'[client_count_prev_yr]) *100
 
 
Unfortunately, when I try to display it, it keeps showing the below error.
 
ZuzanaK_1-1677669111121.png

Could you please help?

 

Thanks, 

Zuzana

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @ZuzanaK 

 

You can try the following methods. [client_count_current] and [client_count_prev_yr] are measures.

%Movement_client = DIVIDE( [client_count_current]-[client_count_prev_yr],[client_count_prev_yr])

vzhangti_0-1677831220348.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @ZuzanaK 

 

You can try the following methods. [client_count_current] and [client_count_prev_yr] are measures.

%Movement_client = DIVIDE( [client_count_current]-[client_count_prev_yr],[client_count_prev_yr])

vzhangti_0-1677831220348.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, 

 

I have used that formula but it still showed the same error. I have changed the source for year and then it worked. 

 

Thanks, 

Zuzana

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors