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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Using FIRSTDATE in measure for percent change (index 100%) line graph

I'm putting together a percent change (index 100%) line graph. I'd like to be able to adjust the start date of the graph and have the chart adjust to 100% for the new date. 

 

Below is the graph. 

 

ryan5028_0-1594126618095.png

 
Below is my dax. I can't figure out how to make my start date adjust based on a slicer. I can get the measure to work using a hard coded date, but not if I use FIRSTDATE. Writing 'Associate Fact Table'[File Date] = FIRSTDATE brings back a True/False error. 
 
Associate Perc Change = ((CALCULATE(SUM('Associate Fact Table'[ActiveStatusIs1]))
-
CALCULATE(SUM('Associate Fact Table'[ActiveStatusIs1]), 'Associate Fact Table'[File Date] = DATE(2018,7,01))))
/
CALCULATE(SUM('Associate Fact Table'[ActiveStatusIs1]), 'Associate Fact Table'[File Date] = DATE(2018,7,01))
+
1
 
Any suggestions on how I can make the chart adjust based on a date selection? I'd like to at least be able to start the chart at 1/1/19 and 1/1/20.
2 REPLIES 2
nvprasad
Solution Sage
Solution Sage

Hi,

Have you tried using SelectedValue measure to get the slicer selection? you can use the result into your formula instead of a hard-coded date.

 

Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂

Regards,
N V Durga Prasad

 

 

 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos.
Follow me on LinkedIn.
Anonymous
Not applicable

Thank you for the suggestion. I didn't have luck with SelectedValue. I still receive the True/False error when I put it in dax. Dax I used is below:

Associate Perc Change = ((CALCULATE(SUM('Associate Fact Table'[ActiveStatusIs1]))

    -

CALCULATE(SUM('Associate Fact Table'[ActiveStatusIs1]), 'Associate Fact Table'[File Date] = SELECTEDVALUE('Associate Fact Table'[File Date],DATE(2018,7,1)))))

    /

CALCULATE(SUM('Associate Fact Table'[ActiveStatusIs1]), SELECTEDVALUE('Associate Fact Table'[File Date],DATE(2018,7,1)))

 

Looking at examples of how to use SelectedValue, I'm not sure how to get it to fit here.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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