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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.