Forum Discussion
Anonymous
4 years agoNot applicable
Countrows to include and display 0 values
Hello PowerBI community, I did a measure to give a number of status updates per project, for a given period (filter dates). For this I use the COUNTROWS() function and it works well. No...
- Anonymous4 years ago
Thank you all very much for your answers.
amitchandaknice one ! I thought it would work but never got a suggestion on-click to see no-data elements for this measure 😕
What finally worked was this :
Status updates count = VAR statusNb = CALCULATE (COUNT ( 'Table'[Status Date] ),ALLSELECTED ( 'Table' ),VALUES ( 'Table'[Project] ))RETURNIF(statusNb=0, 0, statusNb)So instead of using countrows(), I am more explicit by using the field "Project", targeting correctly all projects with corresponding names and it gives me even those with 0 counts. It martches with what I egt manually.I put this measure in Filters and I locked the filter so it displays only a table with 0 at anytime.Hope it serves to someone with the same prolem.
Unfortunately I couldn't find a workaround by using countows().
amitchandak
4 years agoSuper User
Anonymous , You can try Countows(Table)+0 in the measure or the option, Show item with No date