Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Solved! Go to Solution.
Can some one provide me a solution for this issue?
Hi, @vamsikrishna007
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
@vamsikrishna007 , 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])))
The DAX you provided is the same i provided in the Question.
Can you please look into the question again. TIA
Can some one provide me a solution for this issue?
Hi , @vamsikrishna007
Not fully sure .
Take a try to create another measure as below:
measure visual control = IF([ DistinctRosterCount]=0,0,1)
Then apply this measure into visual filter pane :
If it doesn't meet your requirement , please elaborate a bit more.
It will be better if you can provide some sample pbix file to test.
Best Regards,
Community Support Team _ Eason
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |