Forum Discussion
Repleacing blank() with zeros
i need a table only with Machines by MachineType filter (not in red square)
I'm sorry Anonymous - I cannot help. There is no MachineType field in the image so I cannot help you construct a filter based on a field I cannot see or know what is in it. You have to understand I have no idea what your model looks like or your data, beyond your screenshots. You have to provide specific and detailed info.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
- Anonymous6 years agoNot applicable
edhans
of cource. thank youmaybe 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 🤔
- edhans6 years agoCommunity Champion
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