Forum Discussion
badger123
7 years agoResolver I
Calculate Filter Ignoring in Table visual
Something strange is happening with my measure and I can't figure out why / what I need to do to make it work properly. Any advice would be great. I have a table, simplified below, and on the page th...
- 7 years ago
I'm not quite sure I understand. You want to only return the average if the price is not blank? If that's the case, you can either use a visual filter or inside your measure do something like this:
CALCULATE(AVERAGE(Table1[Price]), Table1[Price] <> BLANK())
hnguy71
7 years agoSuper User
It's working for me:
MyMeasure = var avgPrice = AVERAGE(Table1[Price]) var SelectCountry = SELECTEDVALUE(Table1[Country]) Return IF(SelectCountry = 1, FORMAT(avgPrice, "£0.00"), FORMAT(avgPrice, "$0.00"))
badger123
7 years agoResolver I
hnguy71 thanks for helping :) unfortunately it's still not working for me, having tried a few different things. The only reason I can think of is because of blanks in my Price column?
- hnguy717 years agoSuper User
I'm not quite sure I understand. You want to only return the average if the price is not blank? If that's the case, you can either use a visual filter or inside your measure do something like this:
CALCULATE(AVERAGE(Table1[Price]), Table1[Price] <> BLANK())