Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Calculated column, excluding Accounts according to document type

Dear All, 

 

Please assist. I need to create calculated column which will exlcude ALL documents from assigned account, if given account has any DW ducument.  My attemts resulted only in excluding single documents. 

 

Table: Export

 

Expected result:

Thank you for your help. 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    ERD amitchandak 

    Thank you for your effort. I've made it differently. I've duplicated query, filtered out documents other than "DW", and comapred columns Account.

     

    This is small model, such solution is enough. 

     

    Thank you. 

5 Replies

  • Anonymous , I think you need a measure like below and plot that with Account in table visual

     


    measure =
    var _max = countx(allselected(Table), Table[Account] = earlier(Table[Account]) && Table[Document Type] ="DW")
    return
    calculate(sum(table[Value]), filter(Table, isblank(_max)))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you amitchandak , Unfortunatelly following erro appears: "DAX comparison operations do not support comparing values of type True/false with values of type Text "

       

      Is there a solution that can be used in calculated column?

       

       

    • ERD's avatar
      ERD
      Icon for Community Champion rankCommunity Champion

      Anonymous , please, provide your sample data in a table format, not an image.

  • Anonymous's avatar
    Anonymous
    Not applicable

    ERD amitchandak 

    Thank you for your effort. I've made it differently. I've duplicated query, filtered out documents other than "DW", and comapred columns Account.

     

    This is small model, such solution is enough. 

     

    Thank you.