Forum Discussion

LUM's avatar
LUM
Frequent Visitor
5 years ago
Solved

Wrong calculation

Hello,

 

I am trying to calculate and graph the total percentage of attention of my calls, when I am creating the graph, in values, ​​I place the formula and then in the x-axis, I place the date field of the calendar table that I create, data is calculated for the months following, this does not happen if I use the date field of the table where my data is, the problem is that I need to use the calendar table as a date filter.

 

In my tables, I only have information from January 2021 to March 2021 and the formula returns values ​​to December 2021, I have a column that tells me if the call was abandoned or not by assigning 1 and 0, I have another column that registers me If the call was answered or not with the same format 1 and 0, from this data create the following Dax formula:

 

Attention% =

Var Callsabn = Divide (Sum (Fact_Telefonia [Abandons]), Sum (Fac_Telefonia [Attended])) -> (get% of abandonment)

Return

(1-callsabn) -> get the reciprocal of the abandonment % that would be the % of attention

 

How can I fix my formula so that it does not calculate values ​​for the months where I have no information?

 

  • LUM,

     

    Try this measure:

     

    Attention% = 
    VAR Callsabn =
        DIVIDE ( SUM ( Fac_Telefonia[Long Abandons] ), SUM ( Fac_Telefonia[Queued] ) )
    RETURN
        IF ( NOT ISBLANK ( Callsabn ), 1 - Callsabn )

     

    Also, set the X axis to Categorical:

     

     

1 Reply

  • LUM,

     

    Try this measure:

     

    Attention% = 
    VAR Callsabn =
        DIVIDE ( SUM ( Fac_Telefonia[Long Abandons] ), SUM ( Fac_Telefonia[Queued] ) )
    RETURN
        IF ( NOT ISBLANK ( Callsabn ), 1 - Callsabn )

     

    Also, set the X axis to Categorical: