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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MDSNU
New Member

Line graph starting at 100% and still fixed when using data filter (DAX Measure)

Hello Everyone,

 

I need some help with DAX!

 

What I want is to have a fixed value on the Y-Axis and it needs to be still fixed when i'm filtering data, like the example bellow.

 

MDSNU_0-1637975356164.png

 

But when i filter the data to the next month, the value doesnt keep at 100%, it changes to their real value, as the other example bellow:

 

MDSNU_1-1637975551008.png

I tried a lot of DAX Measures, but i still cant do it! Could you guys please help me? 😅

 

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @MDSNU 

 

You can create a measure to replace the current value field in the line chart. In this measure, it needs to compare the current date on X axis to the earliest date of the overall selected date range. If the date on X axis equals to the earliest date, then it returns 100%. If the date on X axis is larger than the earliest date, then it should return the real value of that date. 

Display value = 
VAR vFirstDate = MINX(ALLSELECTED(Data[Date]),Data[Date])
VAR vRealValue = MAX(Data[Percentage])
RETURN
IF(MAX(Data[Date])=vFirstDate,1,vRealValue)

21120303.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @MDSNU 

 

You can create a measure to replace the current value field in the line chart. In this measure, it needs to compare the current date on X axis to the earliest date of the overall selected date range. If the date on X axis equals to the earliest date, then it returns 100%. If the date on X axis is larger than the earliest date, then it should return the real value of that date. 

Display value = 
VAR vFirstDate = MINX(ALLSELECTED(Data[Date]),Data[Date])
VAR vRealValue = MAX(Data[Percentage])
RETURN
IF(MAX(Data[Date])=vFirstDate,1,vRealValue)

21120303.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

lbendlin
Super User
Super User

You can create a measure that always evaluates to 100%  (whatever that means for a given set of months on your X axis) and then add that to your line values.

 

So - what does 100% mean for you?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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