Forum Discussion
Power BI Matrix issue
Hi,
I am new to Power BI. Can some one please help me out.
How to display 0's instead of NULL or BLanks in a matrix in Power BI?
Matrix is filtered based on the month selected (Left side visual). When selected January, in matrix, on expanding the Location R100, there are values for Jan 06, Jan 27 which is correct. But I don’t have to show Jan 13 and Jan 21, because there are no sessions scheduled for those dates. How can i achieve it?
DAX (Measure): DistinctRosterCount:= IF(CALCULATE(DISTINCTCOUNT(FactJobClubOrientation[RosterID])) = BLANK(), 0, CALCULATE(DISTINCTCOUNT(FactJobClubOrientation[RosterID]))).
This is the DAX behind for displaying the values in the Matrix. I can’t replace the 0 in DAX with blank or null because as per the business i have to display 0 in Power BI even though the distinct count is null for a location.
In Matrix, on the rows, I am displaying Location from DimLocation table, SessionDate1 from DimDate table. On the Columns, displaying Description from the DimStatus table (Both Show & NoShow), on the values, I am displaying measure DistinctRosterCount wrote in the Fact table.
Note: "Show items with nodata is turned off" on the rows and columns in the matrix.
SSAS 2017, PBI Sep 2019 versions.
The data source for Power BI report is from the SSAS server.
- Anonymous6 years ago
Can some one provide me a solution for this issue?
5 Replies
- amitchandakSuper User
Anonymous , Try like
DAX (Measure): DistinctRosterCount:= IF(isblank(CALCULATE(DISTINCTCOUNT(FactJobClubOrientation[RosterID])) ), 0, CALCULATE(DISTINCTCOUNT(FactJobClubOrientation[RosterID])))
or
DAX (Measure): DistinctRosterCount:= IF(CALCULATE(DISTINCTCOUNT(FactJobClubOrientation[RosterID])) == BLANK(), 0, CALCULATE(DISTINCTCOUNT(FactJobClubOrientation[RosterID])))- AnonymousNot applicable
The DAX you provided is the same i provided in the Question.
Can you please look into the question again. TIA
- AnonymousNot applicable
Can some one provide me a solution for this issue?
- v-easonf-msftCommunity Support
Hi, Anonymous
Could you please tell me whether your problem has been solved?
For now, there is no content of description in the thread. If you still need help, please share more details to us.Best Regards,
Community Support Team _ Eason