Forum Discussion

NewbieJono's avatar
NewbieJono
Post Partisan
4 years ago
Solved

Top 10

i have a graph with each category displayed as percentage of total. when i select top 10 in filter it changes the percent to the top 10 only.

 

is there anyway of keeping perctage of coloumn total.

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  NewbieJono ,

    I created some data:

    Here are the steps you can follow:

    1. Create measure.

    rank =
    RANKX(ALL('Table'),[category_percentage],,DESC)
    Flag =
    IF(
        [rank]<=10,1,0)

    2. Place [Flag] in Filters, set is=1, apply filter.

    3. Result:

    By tagging and filtering it, the filtered percentage is still calculated by the total amount

     

    Best Regards,

    Liu Yang

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

6 Replies

    • NewbieJono's avatar
      NewbieJono
      Post Partisan

      i not using DAx, i just got total counts and display total as %

  • you have to remove filter from percentage with help of dax by using ALL Function on the percentage column

  • This is what i have now to

     

    Total Failures =

    VAR
    TOTALFAIL = CALCULATE (
    SUM('FACT - Error Data'[ALL]),
    FILTER('FACT - Error Data','FACT - Error Data'[FAILURE REASON]<> 51 && 'FACT - Error Data'[FAILURE REASON]<> 52)
    )

    RETURN

    TOTALFAIL


    ---------------------------------

    Total Transactions =

    VAR
    totalIntefrity = CALCULATE (
    SUM('FACT - Integrity Data'[VOLUME]),
    filter('FACT - Integrity Data','FACT - Integrity Data'[CODE]="TTE.02")
    )

    VAR
    totalError = CALCULATE (
    SUM('FACT - Error Data'[ALL]),
    FILTER('FACT - Error Data','FACT - Error Data'[FAILURE REASON]= 51 || 'FACT - Error Data'[FAILURE REASON]= 52)
    )

    RETURN

    totalIntefrity - TotalError

    ---------------------------------------

    Daily Percentage Failure Rate = [Total Failures] / [Total Transactions]

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  NewbieJono ,

    I created some data:

    Here are the steps you can follow:

    1. Create measure.

    rank =
    RANKX(ALL('Table'),[category_percentage],,DESC)
    Flag =
    IF(
        [rank]<=10,1,0)

    2. Place [Flag] in Filters, set is=1, apply filter.

    3. Result:

    By tagging and filtering it, the filtered percentage is still calculated by the total amount

     

    Best Regards,

    Liu Yang

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