cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
sampath Frequent Visitor
Frequent Visitor

Create a fixed measure which doesn't change with time filter

Hello,

 

i want to create a measure which gives the average value for a column(excluding any 0) and i'll add that measure to a line chart. once i applied date filter it should still show a fixed line but for filtered columns.

 

datevalue
1-Jul9
2-Jul1
3-Jul1
4-Jul8
5-Jul0
6-Jul4
7-Jul4
8-Jul0
9-Jul9

 

if i select all date range it should show a fixed line chart of value 5.14

if i select dates between 7/1-7/4 it should show a fixed line chart of value 4.75

 

below is the graph i want to get. blue line represent values over time and red line reprecent fixed average value for selected date range.

 

Chart.JPG

 

heighly appriciate any help

 

thanks 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Create a fixed measure which doesn't change with time filter

Hi @sampath 

Create a measure

average = CALCULATE(AVERAGE(Sheet2[value]),FILTER(ALLSELECTED(Sheet2),Sheet2[value]<>0))

2.png3.png

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 REPLIES 2
Community Support Team
Community Support Team

Re: Create a fixed measure which doesn't change with time filter

Hi @sampath 

Create a measure

average = CALCULATE(AVERAGE(Sheet2[value]),FILTER(ALLSELECTED(Sheet2),Sheet2[value]<>0))

2.png3.png

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

sampath Frequent Visitor
Frequent Visitor

Re: Create a fixed measure which doesn't change with time filter

@v-juanli-msft  Thank you very much. it works perfectly 

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 40 members 930 guests
Please welcome our newest community members: