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
lexiko80
New Member

Percentage of total filtered count

Hello,

I am trying to show the count of specific observations as a percentage of the total observations made. My solution below works great but as soon as I add a datestamp slicer to the page, where I now want to see the percentage of specific responses made within a specific date range, the percentages no longer correspond.

This is the calculated measure:

 

 

%Observation = 
DIVIDE(
    COUNT(Sheet1[Observation]),
    CALCULATE(
        COUNT(Sheet1[Observation]),ALL(Sheet1[Observation])
    )
)

 

 

So when I place a card visual with %Observation and filter for "Too Cold" which in the sample below is 4 out of 12 observations my card shows %33.33, Great

But once I add datestamp slicer and change the date range a little, the percentages do not make sense.

lexiko80_0-1679783797268.png

 

 

Sample data:

ObservationDatestamp        Screen                                          Location
Too Cold3/1/2023Thermal ComfortA
Too Hot3/2/2023Thermal ComfortB
Too Hot3/1/2023Thermal ComfortC
Too Cold3/1/2023Thermal ComfortA
Too Cold3/20/2023Thermal ComfortA
Too Cold2/21/2023Thermal ComfortB
Comfortable2/21/2023Thermal ComfortC
Comfortable2/20/2023Thermal ComfortC
Comfortable2/20/2023Thermal ComfortC
Comfortable3/2/2023Thermal ComfortA
Comfortable3/2/2023Thermal ComfortA
Comfortable3/3/2023Thermal ComfortB
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Check this file.

Untitled.png


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

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Check this file.

Untitled.png


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

Ashish, creating a new table with a continuous calendar resolved the issue. Thank you for providing the sample file.

You are welcome.


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

Hi @lexiko80 ,
Try changing ALL(Sheet1[Observation]) to ALLSELECTED(Sheet1[Observation], Sheet1[Datestamp])

 

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

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.