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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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