cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

slicing measure problem: Measure is not getting sliced.

HI,

 

I have a slicer (Quarter) in report.

Where I selected quarter 1 then it should select only week 1 to week 13.

 

Problem:

 

When I select quarter 1, other columns are getting sliced except the measure.

 

This is how my out put look like

 

weekhour spenttotal hoursMeasure
1210098%
2410096%
3720097%
4430099%
5625098%
6235099%
7812093%
8932197%
9208075%
10106083%
111234096%
122112283%
13510095%
14  100%
15  100%
16  100%
17  100%
18  100%
19  100%
20  100%
21  100%
22  100%
23  100%
24  100%

 

Column hour is total hours spent for week and total hours is total hours available for the week.

I wanted to calculate the efficiency and for that I have used measure = 1-hours spent/total hours.

 

All I want is when i select the slicer it should display only those value for the measure too.

 

Please advise.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: slicing measure problem: Measure is not getting sliced.

try this

 

=if(sum(tableName[hours sent])=0,blank(),[measure])



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
5 REPLIES 5
Super User
Super User

Re: slicing measure problem: Measure is not getting sliced.

The issue is your measure on the right. It displays 100% if hours spent is blank. Change this measure by wrapping it in an if statement, like

 

=if([hours soent]=0,blank(),[measure])



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Re: slicing measure problem: Measure is not getting sliced.

Thank you @MattAllington for reply.

 

in my case hour spent is a column, and when I create the new measure then IF condition is not allowing me to include a column it is suggesting me all other measure but not any columns.

 

So in this case how should I put the condition.

Super User
Super User

Re: slicing measure problem: Measure is not getting sliced.

try this

 

=if(sum(tableName[hours sent])=0,blank(),[measure])



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Moderator Eric_Zhang
Moderator

Re: slicing measure problem: Measure is not getting sliced.

@aktripathi2506

 

How is it going in your case? @MattAllington's last reply should work based on my test. If you have further questions, feel free to post.

Re: slicing measure problem: Measure is not getting sliced.

Hi @Eric_Zhang,

 

Yes it worked. Thanks @MattAllington

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Users Online
Currently online: 27 members 1,001 guests
Please welcome our newest community members: