Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

DAX Measure help

Hi!   I am trying to migrate a calculation from Qlik to Power BI. But I am having difficulties to make it work 100%.  Would love to have some help here regarding this..   So what I want to do in...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi,

     

    Thanks for your response!

     

    There are some things in this calculation that are not correct from what I asked about from the start.

    - Should be divided by No of Orders in the end

    - Should exclude all rows that has Workgroup = *GDPR* 

     

    I did however solve it afterwards it seems!

     

    VAR dCall =
    CALCULATE(
        [No of Calls],
            Filter( dim_wrapupgroup, NOT( dim_wrapupgroup[Wrap Up Group] IN {"BO Action",
                                                                            "BO Support",
                                                                            "STORE",
                                                                            "H&M CLUB"})),
            Filter( view_interaction, SEARCH("*GDPR*",view_interaction[Workgroup],1,0) = 0 )
    )

    VAR dEmail =
    CALCULATE(
        [No of Emails],
            Filter( dim_wrapupgroup, NOT( dim_wrapupgroup[Wrap Up Group] IN {"BO Action",
                                                                            "BO Support",
                                                                            "STORE",
                                                                            "H&M CLUB"})),
            Filter( view_interaction, SEARCH("*GDPR*",view_interaction[Workgroup],1,0) = 0 )
    )

    VAR dChat =
    SWITCH(TRUE(),
    MAX(dim_agenttype[Agent Type]) = "Live Agent", [No of Chats Answered LA],
    MAX(dim_agenttype[Agent Type]) = "VA Agent", [No of Chats Answered VA],
    [No of Chats Answered]
    )

    VAR dOrder =
    [No of Orders]

    RETURN
    IFERROR((dCall+dEmail+dChat) / dOrder,
        BLANK()
    )