Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Sebastian_N1
Regular Visitor

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

 

Capture.PNG

2 ACCEPTED SOLUTIONS
BrianMiller
Regular 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.

View solution in original post

v-yuta-msft
Community Support
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

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
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

BrianMiller
Regular 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.

Greg_Deckler
Super User
Super User

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.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.