cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StephenF Member
Member

Custom Filtered Measure breaks when using a related slicer

I have a filtered measure (see two versions of same measure below)

 

Smartphone % = CALCULATE(
SUM('FW Monthly'[Ad Views]),
'FW Monthly'[Device] IN { "iPhone App" }
)
/ sum('FW Monthly'[Ad Views])

 

Smartphone % =
VAR __BASELINE_VALUE = SUM('FW Monthly'[Ad Views])
VAR __VALUE_TO_COMPARE = [iPhone Views]
RETURN
DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)+1

 

 

When I click on another graphical item that is related to the iphone views metric I get values over 100%!

 

Why would this be?

 

 

6 REPLIES 6
v-danhe-msft Super Contributor
Super Contributor

Re: Custom Filtered Measure breaks when using a related slicer

Hi @StephenF,

Could you please offer some sample data to have a test if possible?

 

Regards,

Daniel he

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
StephenF Member
Member

Re: Custom Filtered Measure breaks when using a related slicer

Sure,

 

So if i click on an item in a stacked chart of "device by type by ad views" it breaks my % measure in another table...

 

devicetypead views
iphone apppre543
Tablet apppre1234
desktoppre1212
iphone appmid342
Tablet appmid324
desktopmid2
iphone apppost2
Tablet apppost42
desktoppost1
v-danhe-msft Super Contributor
Super Contributor

Re: Custom Filtered Measure breaks when using a related slicer

Hi @StephenF,

Could you mean with below measure, the value will above 100%?

Smartphone % =
VAR __BASELINE_VALUE = SUM('FW Monthly'[Ad Views])
VAR __VALUE_TO_COMPARE = [iPhone Views]
RETURN
DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)+1

But I could not get any information about [iphone Views], could you please offer more information? And from your formula, I noticed that you have added a number "1" in the last of your formula, could it will cause your problem?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
StephenF Member
Member

Re: Custom Filtered Measure breaks when using a related slicer

[iphone views] or [phone views] is just a filtered measure where ad views is filtered where device = iphone.

 

Heres another version of the calculation that does the same thing without the "+1"

 

Smartphone % =
VAR __BASELINE_VALUE = SUM('FW Monthly'[Ad Views])
VAR __VALUE_TO_COMPARE = [Phone Views]
RETURN
DIVIDE(__VALUE_TO_COMPARE, __BASELINE_VALUE)
 
When I have the below selection selected, I am expecting a value of 100% under the smartphone label to left.
 
As it should be (adviews filtered by slection in right hand chart)/  (adviews filtered by selection in right hand chart)
 
 
%phone.jpg
StephenF Member
Member

Re: Custom Filtered Measure breaks when using a related slicer

bump

v-danhe-msft Super Contributor
Super Contributor

Re: Custom Filtered Measure breaks when using a related slicer

Hi @StephenF,

From your formula, it seemed work on my side:

1.PNG

Would you please share your pbix file if possible? Also you can test with our sample report on your side.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 54 members 814 guests
Please welcome our newest community members: