jeudi 21 octobre 2021

function Or In If statement DAX

I currently have some columns in a power Querry Table:

Client Quantity & Quantity Delivered.

I want to have a table which count "1" When Client Quantity are egal to Quantity Delivered and 0 in the countrary.

I tried this:

 [`Client Quantity`]=`Quantity delivered`],
    1,
        0
    )

Wich work but some Client Quantity and Quantity delivered are empty and power bi counts it like a 0.

I only want to keep real datas

I tried this:

    Livraisons blanches = 
 IF(
         [Client Quantity]=[Quantity Delivered]
                    1,
                    IF(
                        [Client Quantity]= BLANK(),
                        BLANK,
                            IF(
                                [Quantity Delivered]=BLANK(),
                                BLANK(),
                                2
                            )
                    )
 )

But its not currently working.

Can i regroup both Client Quantity and Client Delivered to exclude them from the count?

Aucun commentaire:

Enregistrer un commentaire