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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors