cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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.

Sample data:

 Observation Datestamp Screen Location Too Cold 3/1/2023 Thermal Comfort A Too Hot 3/2/2023 Thermal Comfort B Too Hot 3/1/2023 Thermal Comfort C Too Cold 3/1/2023 Thermal Comfort A Too Cold 3/20/2023 Thermal Comfort A Too Cold 2/21/2023 Thermal Comfort B Comfortable 2/21/2023 Thermal Comfort C Comfortable 2/20/2023 Thermal Comfort C Comfortable 2/20/2023 Thermal Comfort C Comfortable 3/2/2023 Thermal Comfort A Comfortable 3/2/2023 Thermal Comfort A Comfortable 3/3/2023 Thermal Comfort B
1 ACCEPTED SOLUTION
Super User

Hi,

Check this file.

Regards,
Ashish Mathur
http://www.ashishmathur.com
4 REPLIES 4
Super User

Hi,

Check this file.

Regards,
Ashish Mathur
http://www.ashishmathur.com
New Member

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

Super User

You are welcome.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Super User

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

 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

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors