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.
Data:
Requirement:
Group API wise and display total success and total failure percentage.
I created the required two measures as follows:
GlobalSuccessPercentage = IF(SUM(GlobalAPIMAPIsUsageDaily[callCountTotal]) == 0, "No Requests" , CONCATENATE(CONVERT
(ROUND(DIVIDE(SUM(GlobalAPIMAPIsUsageDaily[callCountSuccess]),SUM(GlobalAPIMAPIsUsageDaily[callCountTotal])) * 100, 2),STRING), "%"))
Sample output: 88%
GlobalFailurePercentage = IF((GlobalAPIMAPIsUsageDaily[callCountTotal]) == 0, "No Requests" , CONCATENATE(ROUND((DIVIDE(SUM(GlobalAPIMAPIsUsageDaily[callCountFailed])),SUM(GlobalAPIMAPIsUsageDaily[callCountTotal])))*100,2),"%"))
Sample output: 20%
But when i created a card and binded GlobalSuccessPercentage, it is showing below options instead of displaying calculated as it is.
so it either displays first or last or count. so irrespective of API i select it always diplays the same value. Same issue for GlobalFailurePercentage as well.
Please let me know if iam missing anything here.
Solved! Go to Solution.
@maheshchubb123 , Looking at the first measure seems like you are return text. For percent, you should return the number.
Also, seem like is a measure so already aggregated.
Create only this
DIVIDE(SUM(GlobalAPIMAPIsUsageDaily[callCountSuccess]),SUM(GlobalAPIMAPIsUsageDaily[callCountTotal]))
if you return "no request" it will become text. Then the formula is correct and should work.
In case you use the above formula then from the measure tool, mark it % and choose decimal
Hi,
Based on the data that you have shared, please show the exact result that you are expecting. Also, share data in a format that can be pasted in an MS Excel file.
@maheshchubb123 , Looking at the first measure seems like you are return text. For percent, you should return the number.
Also, seem like is a measure so already aggregated.
Create only this
DIVIDE(SUM(GlobalAPIMAPIsUsageDaily[callCountSuccess]),SUM(GlobalAPIMAPIsUsageDaily[callCountTotal]))
if you return "no request" it will become text. Then the formula is correct and should work.
In case you use the above formula then from the measure tool, mark it % and choose decimal
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 |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |