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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.