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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

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.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

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.

Anonymous
Not applicable

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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