Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
EMUDATA
Regular Visitor

Help with DAX code that groups by ACCT_ID and looks for Payment Type

Hi Community,

 

I need help with a DAX code that looks up a table groups the ACCT_ID and only indicates where payments on the account are either AUSTPOST or BPAY.  Insert below helps explain the output required. 

 

EMUDATA_0-1682817799248.png

 

1 ACCEPTED SOLUTION

Hi,

Thank you for your message.

Could you please share your sample pbix file's link?

Are you looking for the calculated measure or calculated column?

 

Thanks. 


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
EMUDATA
Regular Visitor

@jwint Thank you I am receiving and issue with the code below. Are you able to help? It must have something do to with the relationship between the two tables. The TND_SOURCE_CODE is stored in a seperate table to ACCT_ID. 

 

EMUDATA_0-1682833367012.png

 

Hi,

Thank you for your message.

Could you please share your sample pbix file's link?

Are you looking for the calculated measure or calculated column?

 

Thanks. 


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

 

Jihwan_Kim_0-1682832179973.png

 

 

Result required CC =
VAR _conditionone =
    { "BPAY" }
        IN SUMMARIZE (
            FILTER ( Data, Data[Acc_ID] = EARLIER ( Data[Acc_ID] ) ),
            Data[Payment Type]
        )
VAR _conditiontwo =
    { "AustPost" }
        IN SUMMARIZE (
            FILTER ( Data, Data[Acc_ID] = EARLIER ( Data[Acc_ID] ) ),
            Data[Payment Type]
        )
VAR _conditionthree =
    ( _conditionone || _conditiontwo )
        && COUNTROWS (
            FILTER (
                Data,
                Data[Acc_ID] = EARLIER ( Data[Acc_ID] )
                    && Data[Payment Type] <> "BPAY"
                    && Data[Payment Type] <> "AustPost"
            )
        ) = 0
RETURN
    DIVIDE ( _conditionthree, _conditionthree )

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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.