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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Need help with some ideas for solve my problems of conditions

I have a table that shows payment commissions '(Consult[Commission])' for each product sale '(Consult[serialnumber]', each line shows a payment, however I have codes where more than one type of commission was paid, so in same table I get duplicate product codes for different commissions, however some commissions cannot be paid for the same product, I need a DAX to do this check, I have another table with the name of each type of commission '(Parameters[ commission]) and which commission cannot be paid together '(Parameters[notaccumulate])'

Unfortunately I can't show much, as it is confidential information
For some commissions, there are several that cannot accumulate, so it ended up in this format:

Table: parameters    Table : Consult

 

 

 
comissionNot acumulate   Serial numberComission 
AA001AA002   AWB2703A002 
AA002AA004   AWB2704AA003 
AA003 AA005   AWB2704AA005 
AA003 AA001   AWB2706  
AA003AA002      
        

I tried to create an index to classify the same codes with a single number and create a single table, returning whether the code should not have been paid or whether it is ok, but it didn't work,
i tri to summarize and rankx

and that was my last attempt

 

 

ElegibilityCheckGeneric =
VAR SelectedCommission = 'GenericTable'[Commission]
VAR SelectedProductID = 'GenericTable'[ProductID]
VAR DisallowedCommissions =
    CALCULATETABLE(
        VALUES('GenericTable'[DisallowedCommission]),
        'GenericTable'[Commission] = SelectedCommission,
        'GenericTable'[ProductID] = SelectedProductID
    )
RETURN
    IF(
        COUNTROWS(DisallowedCommissions) > 0,
        "Check Eligibility",
        "Correct Payment"
    )

and try like this too

PaymentVerificationGeneric =
ADDCOLUMNS(
    SUMMARIZE(GenericTable, GenericTable[GroupingColumn1], GenericTable[GroupingColumn2], GenericTable[DisallowedColumn]),
    "Result",
    IF(
        COUNTROWS(
            FILTER(
                ALL(GenericTable),
                GenericTable[GroupingColumn1] = EARLIER(GenericTable[GroupingColumn1]) &&
                GenericTable[GroupingColumn2] = EARLIER(GenericTable[DisallowedColumn])
            )
        ) > 0,
        "Invalid Payment",
        "OK"
    )
)

Pleasee someone help me...

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.