Forum Discussion
Arnault_
Resolver III
7 years agoDAX optimization / 0 vs Blank issue
Dear Power bi users, I have created 2 measures to achieve the following: - measuring a difference between 2 dates (deviation) : "On-time delivery (dev.)" - counting the number of occurence (dev...
- 7 years ago
Hi Arnault_,
Actually, the isblank() can do this job. It's simple to use. Please also try this formula.
On-time delivery (val) new = CALCULATE ( DISTINCTCOUNT ( 'FACT Order'[packing_line_id] ), FILTER ( VALUES ( 'FACT Order'[packing_line_id] ), [On-time delivery (dev.)] >= - 'DIM Deviation'[Deviation value Selected] && [On-time delivery (dev.)] <= 'DIM Deviation'[Deviation value Selected] && ISBLANK ( [On-time delivery (dev.)] ) = FALSE () ) )
Best Regards,
v-jiascu-msft
Microsoft Employee
7 years agoHi Arnault_,
Actually, the isblank() can do this job. It's simple to use. Please also try this formula.
On-time delivery (val) new = CALCULATE ( DISTINCTCOUNT ( 'FACT Order'[packing_line_id] ), FILTER ( VALUES ( 'FACT Order'[packing_line_id] ), [On-time delivery (dev.)] >= - 'DIM Deviation'[Deviation value Selected] && [On-time delivery (dev.)] <= 'DIM Deviation'[Deviation value Selected] && ISBLANK ( [On-time delivery (dev.)] ) = FALSE () ) )
Best Regards,
Arnault_
Resolver III
7 years agoDear v-jiascu-msft,
I am very, very grateful to you for having solved my problem. I wasn't that far from the solution however your proposition helped me better understand my mistake and improve my knowledge of DAX.
Many thanks for that.
Best