cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors