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

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

Reply
Jerenes
New Member

Stuck with adding second percentage line using calculated, filtered baseline in a variable from data

Hi all,
I'm not exactly new to PowerBI, but now I have a measure that just doesn't seem to work for me.
I am stuck and I would appreciate a fresh, smarter pair of eyes and brains from this community.
A little backdrop:
I made a PowerBI capacity report to show the number of UC users for a bunch of cloud based tenants.
The bars show the maximum number of tenants (calculated in a measure) in that month, filtered by a slicer visual on tenant level. The months are shown as part of the integrated 'date hierarchy' functionality in the visualization.
A secondary axel line chart gives me the percentages of the grandtotal against the highest value of onprem users.Changing the Slicer to change the tenant works both on the bars and the line chart, that is I believe because it's handled by the integrated visualization sources.
 
My aim is to do the following:
I want the secondary line chart to show the percentages month per month from a baseline. The baseline should be the maximum number of onprem users of a month. Specifically, the first month shown in the visual.
I can settle with the baseline starting from january 2019, but ideally, when I filter on the visual, it takes it into account.
I know the logic behind it and tried to pour it into a measure (or combined measure), but I just can't seem to get it to work.
Is there some Power BI Guru/God/Omnipotent wizard that can help me out in what I want to achieve?
Or a math wizard that knows how I can put my baseline value in a variable.
 
Additional information:
- As an aid, I have created a custom column in my table where the month and year are combined as 1-2019, 2-2019, ..., 12-2020
- the source is a daily incremental csv file, that is why I created a column that combines the month-year.
Hereunder the custom measures where I attempt to reach my goal:
Delta Measure: Current month divided by Baseline (first month = January 2019)
Current month is integrated date hierarchy on the shared axis in the visual.

 

 

 

Delta_OnPrem_Trying =

var BaseOnPrem = [MonthlyMaxOnPrem]

var CurrentOnPrem = [MaxOnPrem]

RETURN

DIVIDE(CurrentOnPrem,BaseOnPrem)

 

 

 

 
Measure Variables

 

 

 

MaxOnPrem = CALCULATE( MAX(SfB_Capacity[OnPrem Users]) ) 

 

 

 

 

 

MonthlyMaxOnPrem = CALCULATE ( MAX(SfB_Capacity[OnPrem Users]),FILTER(SfB_Capacity, SfB_Capacity[Month-Year] = MIN(SfB_Capacity[Month-Year]) ))

 

 

 

Can someone help me out here?

Thanks in advance.

2 REPLIES 2
HotChilli
Super User
Super User

There's a lot of description in the question.

Can't you link your pbix here and show us what your desired outcome is?

Hi HotChilli,

Thanks for the reply. Due to holiday season, I've been offline for a couple of days. Apologies for the late reply therefor.

 

I can't link my PBIX due to the sensitive information in there.

My desired outcome was that I would like to see a basevalue for the percentages towards the future. Not the latest.

In any case, I have found out where I went wrong. I needed to use the ALLSELECTED part on my measure. That made sure it also follows the filters aI have and allows me to select the first value in the graph.

 

Thank you for actively thinking along though.

Have a happy newyear!

 

Kr

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.