Forum Discussion
aTChris
Resolver I
6 years agoAnalyze in Excel - cant show items with no data
Hi, I wonder if anyone has found a solution for this.
I have a Power BI report which shows contracted revenue per per per asset within a matrix. Using show items with no data I can see assets without any revenue.
The issue is when I connect to the dataset using Analyze in excel. The option for show items with no data is grey'd out.
The revenue is measure, ive tried replacing blanks with a 0 but that breaks any slicer applied to the matrix.
Contract Revenue =
IF (
CALCULATE ( SUM ( Contracts[Revenue] ) ) = BLANK (),
0,
CALCULATE ( SUM ( Contracts[Revenue] ) )
)
3 Replies
- rayishome
Resolver I
Found a workable solution while reviewing the documentation on how PBI deals with missing values.
Measure = IF(ISBLANK(SUM('Table'[Cnt])),IF(CALCULATE(COUNTROWS('DimTableWithMissingValues'))>0,0),SUM('Table'[Cnt]))The Answer is here: https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-show-items-no-dataSince there is no explicit measure and the two tables are directly related, Power BI attempts to inject a measure to constrain the combinations that result. In this case, Power BI injects a CALCULATE(COUNTROWS('Product')) measure, which should not be blank, since Product is the table that is common to both tables.