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.
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.
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]))
Solved! Go to Solution.
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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
44 | |
32 | |
30 | |
18 | |
17 |