Forum Discussion

BI_ITEMS's avatar
BI_ITEMS
Regular Visitor
3 years ago

Trouble calculating Percentage based on Card

Hello team BI, 
I have a problem with percentage calculation

I made 2 slicers with: 

- Date sent Quote: that interact with QUOTE AMOUNT ISSUED and NB QUOTE ISSUED

- Order Date: that interact with QUOTE AMOUNT EARNED and NB QUOTE EARNED and both Transformation Quote

I have the correct data with amount & nd but not Transformation with the count of percentage

Clearlly, 170/375 = 45% and not 84% as shown in Bi.

I found out, that in percentage Bi didn't took the filtred data shown in card but the whole table data.

The dax used to calculate Percentage: 

Transformation quote (%nb) =
DIVIDE(
    [NB QUOTE EARNED],[NB QUOTE ISSUED],0
    )
with: 
NB QUOTE EARNED = CALCULATE(COUNTROWS('BDD TRY'),
                                    'BDD TRY'[POINTAGE]="Transféré"
                                    )+0
And
NB QUOTE ISSUED = CALCULATE(
    COUNTROWS('BDD TRY'
)+0)
 
 

 

POINTAGETYPE PRICE HT €DATE SENT QUOTEORDER DATE
 Maintenance        72,416.16 €14/09/202208/09/2021
TransféréMaintenance          1,290.50 €27/01/202228/01/2022
 Travaux              930.00 €07/02/202210/02/2022
TransféréTravaux          1,863.10 €02/02/202210/02/2022
TransféréTravaux                       -   €07/02/202210/02/2022
 Maintenance          1,860.00 €10/02/202216/02/2022
TransféréTravaux          6,437.80 €25/01/202217/02/2022
TransféréTravaux8,604.20 €12/01/202218/02/2022
TransféréTravaux          1,257.50 €13/01/202218/02/2022
TransféréTravaux667.60 €11/02/202221/02/2022

2 Replies

  • BI_ITEMS , Try measure like

     

    nb quote earned =
    CALCULATE(
    COUNTROWS('BDD TRY'),
    'BDD TRY'[POINTAGE] = "Transféré"
    )


    nb quote issued =
    CALCULATE(
    COUNTROWS('BDD TRY')
    )


    Transformation quote (%nb) =
    DIVIDE(
    [nb quote earned],
    [nb quote issued],
    0
    )

    • BI_ITEMS's avatar
      BI_ITEMS
      Regular Visitor

      Hello!

      Thanks for your reply!

      However, I aleardy apply those measure but same probleme.