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! Learn more

Reply
hendrikw
New Member

Data Comparison

Hello there 🙂

I was wondering if someone could help me with my problem. Currently I am trying to compare 2 different tables and check for differences between the two. I wrote this DAX-Code: 

Column =

VAR Anzahl_Benchmark = COUNTROWS('Benchmark')
 
VAR Anzahl_Ubereinstimmungen = CALCULATE(
    COUNTROWS('Rainforest product'),
    INTERSECT(
        DISTINCT('Benchmark'[request_parameters.asin]), 'Benchmark'[product.variant_asins_flat],
        DISTINCT('Rainforest product'[request_parameters.asin]), 'Rainforest product'[product.variant_asins_flat]
    )
)

RETURN
    IF(Anzahl_Benchmark = Anzahl_Ubereinstimmungen, "Load Successful", "Load Failed")
 
The error message says: "Parameter is not the Correct Type." Both parameters are Text. 
 
Any help is appreciated and thank you very much in advance 🙂
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @hendrikw ,

 

Modify your formula like below:

result_ = 
VAR Anzahl_Benchmark =
    COUNTROWS ( 'Benchmark' )
VAR Anzahl_Ubereinstimmungen =
    CALCULATE (
        COUNTROWS ( 'Rainforest product' ),
        INTERSECT (
            DISTINCT ( 'Benchmark'[request_parameters.asin] ),
            DISTINCT ( 'Rainforest product'[request_parameters.asin] )
        ),
        INTERSECT (
            DISTINCT ( 'Benchmark'[product.variant_asins_flat] ),
            DISTINCT ( 'Rainforest product'[product.variant_asins_flat] )
        )
    )
RETURN

    IF (
        Anzahl_Benchmark = Anzahl_Ubereinstimmungen,
        "Load Successful",
        "Load Failed"
    )

vkongfanfmsft_0-1710991292079.png

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @hendrikw ,

 

Modify your formula like below:

result_ = 
VAR Anzahl_Benchmark =
    COUNTROWS ( 'Benchmark' )
VAR Anzahl_Ubereinstimmungen =
    CALCULATE (
        COUNTROWS ( 'Rainforest product' ),
        INTERSECT (
            DISTINCT ( 'Benchmark'[request_parameters.asin] ),
            DISTINCT ( 'Rainforest product'[request_parameters.asin] )
        ),
        INTERSECT (
            DISTINCT ( 'Benchmark'[product.variant_asins_flat] ),
            DISTINCT ( 'Rainforest product'[product.variant_asins_flat] )
        )
    )
RETURN

    IF (
        Anzahl_Benchmark = Anzahl_Ubereinstimmungen,
        "Load Successful",
        "Load Failed"
    )

vkongfanfmsft_0-1710991292079.png

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

bhanu_gautam
Super User
Super User

@hendrikw , Try using below method I have changed Distinct with Values to convert the table into sets

 

Column =

VAR Anzahl_Benchmark = COUNTROWS('Benchmark')

VAR Anzahl_Ubereinstimmungen = CALCULATE(
COUNTROWS('Rainforest product'),
INTERSECT(
VALUES('Benchmark'[request_parameters.asin]), VALUES('Benchmark'[product.variant_asins_flat]),
VALUES('Rainforest product'[request_parameters.asin]), VALUES('Rainforest product'[product.variant_asins_flat])
)
)

RETURN
IF(Anzahl_Benchmark = Anzahl_Ubereinstimmungen, "Load Successful", "Load Failed")

 

Please give kudos and accept as solution if it helps




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






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.