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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dcg38524
Helper III
Helper III

Percentage of dashboard Card / Silcer filter results

Hello everyone,

 

I need your help & advice - We have created a dashboard which does include a Slicer & Cards.  We are looking to add another Card which will Illustrate the percentage of Outage Count when a single Year is selected within Slicer "Year"(see snap shot below)

 

I am not suprise the DAX script created below does not work.

 

Any help would be greatly appreciated.

 

Dashboard Filter.jpg

 

Percentage Count = 
    SUM('MajorIncidentTickets_2022-23'[number]) /CALCULATE(SUM('MajorIncidentTickets_2022-23'[number]), FILTER(ALL('MajorIncidentTickets_2022-23'),'MajorIncidentTickets_2022-23'[problem_id]=SELECTEDVALUE('MajorIncidentTickets_2022-23[problem_id]))

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @dcg38524 ,

 

I think you just need ALL() function in second part code, remove the SELECTEDVALUE() part, or your measure will return 100%.

Percentage Count =
VAR _SelectPeriod =
    CALCULATE ( SUM ( 'MajorIncidentTickets_2022-23'[number] ) )
VAR _Total =
    CALCULATE (
        SUM ( 'MajorIncidentTickets_2022-23'[number] ),
        ALL ( 'MajorIncidentTickets_2022-23' )
    )
RETURN
    DIVIDE ( _SelectPeriod, _Total )

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @dcg38524 ,

 

I think you just need ALL() function in second part code, remove the SELECTEDVALUE() part, or your measure will return 100%.

Percentage Count =
VAR _SelectPeriod =
    CALCULATE ( SUM ( 'MajorIncidentTickets_2022-23'[number] ) )
VAR _Total =
    CALCULATE (
        SUM ( 'MajorIncidentTickets_2022-23'[number] ),
        ALL ( 'MajorIncidentTickets_2022-23' )
    )
RETURN
    DIVIDE ( _SelectPeriod, _Total )

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Rico,

This reall helps a great deal - I cannot thank you enough for taking the time to post a great solution.

 

Regards,

Don

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors