Forum Discussion
Slicer showing unselected values
So I have a slicer that filters out employees based on thier supervisor. When i try to exclude a supervisors team, that supervisors team still shows but they are just blank. This issue strted when i input this measure to sum durations. Is there any way I can keep the sum of the durations and have the table only show the actuall values selected?
Heres the formula i used to sum duration:
Logged In Time = (VAR TotalSeconds=SUMX('ScorecardRawData',HOUR('ScorecardRawData'[LoggedOnTime])*3600+MINUTE('ScorecardRawData'[LoggedOnTime])*60+SECOND('ScorecardRawData'[LoggedOnTime]))
VAR Days =TRUNC(TotalSeconds/3600/8)
VAR Hors = TRUNC((TotalSeconds-Days*3600*8)/3600)
VAR Mins =TRUNC(MOD(TotalSeconds,3600)/60)
VAR Secs = MOD(TotalSeconds,60)
return IF(Hors<10,"0"&Hors,Hors)&":"&IF(Mins<10,"0"&Mins,Mins)&":"&IF(Secs<10,"0"&Secs,Secs))
Here is what my table look slike when i try and filter. The Red values should not be showing up at all because I have not selected those people in my slicer
You should be able to use the filter on the measure to only show when the measure is greater than zero. This will eliminate the empty rows.
Hi Sebastian_N1,
As a general solution, you can add an if condition to wrap your measure like pattern below:
Average of SF% = IF ( CALCULATE ( aggregation ) <> BLANK (), CALCULATE ( aggregation ) )
Regards,
Jimmy Tao
3 Replies
- Greg_Deckler
Community Champion
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Sample data.
- BrianMillerRegular Visitor
You should be able to use the filter on the measure to only show when the measure is greater than zero. This will eliminate the empty rows.
- v-yuta-msft
Community Support
Hi Sebastian_N1,
As a general solution, you can add an if condition to wrap your measure like pattern below:
Average of SF% = IF ( CALCULATE ( aggregation ) <> BLANK (), CALCULATE ( aggregation ) )
Regards,
Jimmy Tao