Forum Discussion
Replacing blank fields in a matrix table with 0's
I have tried several way to replace the blank boxes with 0's in my matrix table and nothing works. The matrix table shows counts of the field 'Faculty Rank' and some counts are blank since there are 0 records. I want to replace those blank fields with 0. Here are the 3 ways i tried already:
1) adding +0
2) creating a new measure within my table:
3 Replies
- mahoneypat
Microsoft Employee
Your #3 approach is the way to get there. Make your DISTINCT() table, use the new column in your visual, and use TREATAS() in a new measure. Something along these lines
NewMeasure = CALCULATE([OldMeasure], TREATAS(VALUES(NewTable[Column]), OldTable[Column])) + 0
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- amitchandak
Super User
elopez ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- elopez
Helper I
I tried to replicate the file. hopefully it helps and we are able to figure it out!
File:
https://iu.box.com/s/m6rrz07lxmmq6adc30tij8k2fqiqd7vi
Data source:
https://iu.box.com/s/dswykrnfix9a5y0xxi8ofcjf0gqibb4d