Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Need a filter based on transaction level

Need a filter based on the below sample data, transaction level

Please help

 

9 Replies

  • Anonymous , You can create a new column like

     

    Switch( True(),
    not(isblank([Debit])) && not(isblank([Debit])) , "CR & DR" ,
    (isblank([Debit])) && (isblank([Debit])) , "Zero" ,
    not(isblank([Debit])) ,"Only CR",
    "Only DR"
    )

  • tex628's avatar
    tex628
    Community Champion

    Try this:

    Column = 
    VAR D = Table [DEBIT]
    VAR C = Table [CREDIT]
    Return
    IF(
    C = BLANK() && D <> BLANK() , "ONLY CR" , 
    IF( 
    D = BLANK() && C <> BLANK() , "ONLY DR" ,
    IF( 
    C <> BLANK() && D <> BLANK() , "CR & DR" ,
    IF( 
    D = BLANK() && C = BLANK() , "ZERO" , 
    BLANK()
    )

    • Anonymous's avatar
      Anonymous
      Not applicable

      tex628 I tried different formulas, but filter is not showing CR & DR, rest everything is showing.

      • tex628's avatar
        tex628
        Community Champion

        Can you by any chance provide a picture of the outcome? 

        / J

  • Hi, Anonymous 

    Please correct me if I wrongly understand your question.

    I think you can put filters inside your DAX measure to show CRonly or DRonly, or ALL.

    If it is OK with you, please share your sample pbix file, then I can come up with more accurate measures.

     

    Thank you.

    Hi, My name is Jihwan Kim.

    If this post helps, then please consider accept it as the solution to help other members find it faster.