Forum Discussion
Matrix - How to add a string value in a number column
- 8 years ago
You still have add new measure and change the formula like this, I was not aware if average is pre-calculated.
Add following measure and use it in your report.
My Average = var myAvg = Average(Table3[Weighted_Average]) return if(ISBLANK(myAvg), "NA", myAvg)
Ok, so add a measure for average calculation , if you already have just change it as below:
Avg = var a = AVERAGE(Table3[Rating]) return if(ISBLANK(a) || a = 0, "NA", a)
parry2kWeighted_Avg is being calculated in SQl and thats a float field. its not accepting NA since its a varchar
- parry2k8 years ago
Super User
You still have add new measure and change the formula like this, I was not aware if average is pre-calculated.
Add following measure and use it in your report.
My Average = var myAvg = Average(Table3[Weighted_Average]) return if(ISBLANK(myAvg), "NA", myAvg)
- v-nankh8 years agoFrequent Visitor
parry2kThank you so much :smileyhappy:
It's working!
I have another question. I am trying to apply conditional formatting. If the average is below 3 then it should be colored as red , if the average is above is 3 it should be green and if its NA then it should be grey. I was able to apply conditional formatting for below and above number 3 but not for NA.
- parry2k8 years ago
Super User
Glad to hear it is working, not sure if color formatting can be done as you described.