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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dynamic Rebasing Chart

Hello there,

 

I found this very similar question but I cant seem to find the solution and figure out how to edit - Old Case 

 

Similar to it, I am using a slicer to show the start and end date for a chart where the Start Date will also be used as the rebasing date. I have the codes below derived from a quick measure but I am not getting the correct chart.. My expectation is it should be indexed at 100 on the Start Date from the slider. I would appreciate your help as I am new to DAX.

 

Screenshot 2020-12-21 234215.png


Return =
VAR __BASELINE_VALUE =
    CALCULATE(
        SUM('PH Equity Indices'[Value]),
        ALLSELECTED('PH Equity Indices'[Date])
    )
VAR __MEASURE_VALUE = SUM('PH Equity Indices'[Value])
RETURN
    IF(
        NOT ISBLANK(__MEASURE_VALUE),
        DIVIDE(__MEASURE_VALUE - __BASELINE_VALUE, __BASELINE_VALUE)+100
    )

3 REPLIES 3
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Do you want to display the 100 in the min date?

If yes, we can create a date table and a measure to meet your requirement.

 

1. Create a date table that has no relationship.

 

Date = CALENDAR("2020/1/1","2020/1/31")

 

dy1.jpg

 

2. Then we can create a measure.

 

Measure = 
var _min = MIN('Date'[Date])
var _max = MAX('Date'[Date])
return
IF(
    MAX('Table'[Date]) = _min,100,
    CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[Date]<=_max && 'Table'[Date] >=_min)))

 

dy2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

Anonymous
Not applicable

Hi @v-zhenbw-msft thank you so much! Although the calculation in your pbix seems to be incorrect? I would expect the higlighted results below if I choose Jan 1 2020 as the Start Date.

 

lxmnl_0-1608994569256.png

 

Greg_Deckler
Community Champion
Community Champion

@Anonymous Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors