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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ishazel
Frequent Visitor

Why is my measure not working and only affected by some slicers?

I read some other posts but can't get this fixed.

 

Measure 1: 

TotalAuths = CALCULATE(DISTINCTCOUNT('Auths'[AuthId]))

Measure 2:

AuthsSentToUm = 
CALCULATE(
    COUNT('Auths'[AuthId]),
    FILTER(
        'Auths',
        'Auths'[SentToUM] = 1 <Can be 1 or 0>
    )
)

Measure 3:

%SentToUm = IF([TotalAuths] = 0, 0, ([AuthsSentToUm] / [TotalAuths]) * 100)

 

Measures 1 and 2 are working correctly and are affected by all slicers. So I have cards for them and say TotalAuths is 100 and AuthsSentToUm is 20, %SentToUm is reporting 100% and doesn't change when I change the date slicer, it's just always 100%, though strangly it will go to 0% if I set the SentToUm slicer to 0, which is correct.

 

Thanks for any tips..!

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Revise/simplify your measures to:

TotalAuths = DISTINCTCOUNT('Auths'[AuthId])
AuthsSentToUm = CALCULATE([Totalauths],'Auths'[SentToUM] = 1)
%SentToUm = DIVIDE([AuthsSentToUm],[TotalAuths])

Format the last measure as %.

If this does not help, then share the download link of the PBI file.  Show the problem and the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

No luck. I'm working with private health info so I can't really share anything. I'll keep messing with it. Thanks for trying 🙂

PhilipTreacy
Super User
Super User

Hi @ishazel 

 

If you provide your data it'll be easier to debug the problem.

 

But try this for Measure 1

 

TotalAuths = CALCULATE(DISTINCTCOUNT('Auths'[AuthId]), ALL(Auths))

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.