cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Anonymous
Not applicable

## Need a filter based on transaction level

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

9 REPLIES 9
Super User

Hi, @Anonymous

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.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

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
Not applicable

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

Community Champion

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

/ J

Anonymous
Not applicable
Anonymous
Not applicable

@tex628 ,first customer is having both debit and credit. In need that filter in this case.

Community Champion

That is because on a transactional level there are no records that has both Credit and Debit.

Currently you have only credit transactions in "ONLY CR BAL" table, and you have only debit transactions in the "ONLY DR BAL" table.

In your "CR & DR" Table, do you want all transactions or what is your aim here?

/ J

Anonymous
Not applicable

@tex628 first customer is having both debit and credit. In need that filter in this case.

Super User

@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"
)

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors