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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Conditional difference versus previous period

Hello folks,

 

I have been struggling on this headcount report for a while..

I want to show the headcount variation versus previous period, which I managed to do with:

 

BUD_PREV_PERIOD = CALCULATE(sum(Headcount1[BUD]);DATEADD(Headcount1[PERIOD].[Date];-1;MONTH))

and then calculating the difference between Budget and BUD_prev_period.

 

Now I want to split that value into 2 options (measures/columns): is the headcount difference part of a certain regional plan or not (see the -1 below). I thought it would be easy with a SUMX or so but I don't get there...

 

Diff FOR REGION = SUMX(FILTER(Headcount1;Headcount1[REGIONAL PLAN]="YES");[BUD_diff])

 

Do you have any ideas? Many thanks!!

 

PeriodNameRegion planBudget       
2019/1Person1Yes1 Final table2019/12019/22019/32019/42019/5
2019/2Person1Yes1 Total Headcount21100
2019/3Person1Yes1 Diff prev period -10-10
2019/4Person1Yes0 Diff (Regional plan)   -1 
2019/5Person1Yes0 Diff (no plan)0-1000
2019/1Person2No1       
2019/2Person2No0       
2019/3Person2No0       
2019/4Person2No0       
2019/5Person2No0       
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

I believe this is the result you want.  You may download my PBI file from here.

 

Hope this helps.

 

Reginoal plan diff.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

 

I believe this is the result you want.  You may download my PBI file from here.

 

Hope this helps.

 

Reginoal plan diff.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.