Forum Discussion
DAX Pourcentage Calculation for text format
- Anonymous2 years ago
Hi, dofrancis3
Thank you very much for your reply. First, you need to change the expression of the calculated column to:
Percentage = VAR _status_fail = CALCULATE(COUNTROWS('repository'),FILTER('repository','repository'[Country]=EARLIER(repository[Country])&&'repository'[Staus]="Fail"||'repository'[Staus]="Pass")) VAR _total_status = CALCULATE(COUNTROWS('repository'),FILTER(ALL(repository),'repository'[Staus]="Fail"||'repository'[Staus]="Pass")) RETURN IF(NOT ISBLANK('repository'[Staus]),DIVIDE(_status_fail,_total_status))In the top navigation bar, format this column without percentages:
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dear Anonymous thank you for this but please could you let me know how can i change the percentage in "Whole or Percentage format" because the percentage is in text format and i can't make any chart.
Please suport
Hi, dofrancis3
Thank you very much for your reply. First, you need to change the expression of the calculated column to:
Percentage =
VAR _status_fail = CALCULATE(COUNTROWS('repository'),FILTER('repository','repository'[Country]=EARLIER(repository[Country])&&'repository'[Staus]="Fail"||'repository'[Staus]="Pass"))
VAR _total_status = CALCULATE(COUNTROWS('repository'),FILTER(ALL(repository),'repository'[Staus]="Fail"||'repository'[Staus]="Pass"))
RETURN IF(NOT ISBLANK('repository'[Staus]),DIVIDE(_status_fail,_total_status))
In the top navigation bar, format this column without percentages:
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.