Forum Discussion
Repleacing blank() with zeros
edhans
of cource. thank you
maybe this help:
all measures:
Production:= SUM( Production[ProducedParts] )
Scraps:= SUM( Scrap[pocet] )
All:= [Total Production] + [Total Scraps]
Scraps of All %:= DIVIDE( [Scraps], [All] )
Production of All%:= DIVIDE( [Production], [All] )
model:
* MachineCodebook = Machines (from my examples)
I have put MachineType fied to table. now a see its wrong. By why 🤔
Anonymous Check out this article on how DAX handles blanks. A number plus a blank = that number, but when you divide with a blank, it returns a blank, not a zero.
You can show/hide items with "no data" which is a blank, using the column setting I gave earlier in a screenshot, or you can cause blanks to return as zero using COALESCE as mentioned before. In its simplest form:
Measure = COALESCE([Some Other Measure], 0)
That will return 0 if the [Some Other Measure] returns a blank.
- Anonymous6 years agoNot applicable
edhans here is an example file
https://www.uschovna.cz/zasilka/ZRT6735A7CEI7IE9-93X/
If you add Scraps % measure to table, it will repeat all machines to all machinetypes. What is happend with relationship?
i dont understand why
thank you