Forum Discussion
ISBLANK() or Measure +0 not working
- 4 years ago
Yes. You need to change the measure to reference the field from the dimension table:
% = VAR currentImporto = [Sum - IsBlankMeasure] VAR AllImporto = CALCULATE( [Sum - IsBlankMeasure], ALL('DModello'[MODELLO]) ) var ratio = DIVIDE(currentImporto,AllImporto) return ratio
The problem doesn't appear to be your measure definition but the behaviour of SUMMARIZECOLUMNS, which is what Power BI uses behind the scenes to generate the output for visuals. I created a dummy measure which simply returns 1 and I couldn't get SUMMARIZECOLUMNS to show a value for CCC or EEE when the year was filtered to 2022.
It seems to me like SUMMARIZECOLUMNS isn't even attempting to execute the measure if the underlying category, in this case MODELLO, does not exist in the filtered data.
I think your only chance is to make sure that you have at least 1 entry in each year for each product. You may be able to use Power Query or DAX to work out which products are missing for a given year and create dummy entries for those products