Problème de formule

Étiquetté : 

  • Problème de formule

    Posté par Lilian sur 7 mai 2024 à 10h54

    Bonjour. J’ai une question concernant le code ci-dessous qui ne me renvoi pas la bonne valeur quand la situiation recherchée existe réellement dans le fichier source. En fait ma colonne ne me renvoi que du vide alors que j’ai bien des CasProblématiques. J’ai vérifié les intitulés de colonnes pour moi RAS, idem sur les valeurs recherchées RAS pour moi. Je ne vois pas pourquoi ma formule ne marche pas, si vosu avez eds idées je suis preneur par avance merci.

    Lilian

    CasProblématiques =

    VAR AffaireCotation =

    CALCULATETABLE (

    VALUES( ‘Demandes ADV'[Nom affaire] ),

    ‘Demandes ADV'[Type de demande] = “Cotation”

    )

    VAR AffaireAutre =

    CALCULATETABLE (

    VALUES ( ‘Demandes ADV'[Nom affaire] ),

    ‘Demandes ADV'[Type de demande] = “Autre”

    && ‘Demandes ADV'[Type d’offre] = “z_Autre Réunion d’enclenchement”

    )

    VAR AffairesCommunes =

    INTERSECT ( AffaireCotation, AffaireAutre )

    VAR NbAffairesCommunes = COUNTROWS( AffairesCommunes)

    RETURN

    IF (

    NbAffairesCommunes > 0,

    “Cas problématique”,

    BLANK ()

    )

    David a répondu Il y a 4 mois 3 Membres · 12 Réponses
  • 12 Réponses
  • David

    Membre
    7 mai 2024 à 11h05

    Bonjour Lilian

    Tu peux mettre à disposition un fichier avec des données exemples ?

  • Lilian

    Membre
    7 mai 2024 à 11h14

    Bonjour David oui bien sûr :

    <table style=”border-collapse: collapse; width: 648pt;” border=”0″ width=”865″ cellspacing=”0″ cellpadding=”0″><colgroup><col style=”mso-width-source: userset; mso-width-alt: 7224; width: 152pt;” width=”203″> <col style=”mso-width-source: userset; mso-width-alt: 8391; width: 177pt;” width=”236″> <col style=”mso-width-source: userset; mso-width-alt: 15132; width: 319pt;” width=”426″> </colgroup>
    <tbody>
    <tr style=”height: 14.4pt;”>
    <td class=”xl63″ style=”height: 14.4pt; width: 152pt;” width=”203″ height=”19″>Nom affaire</td>
    <td class=”xl64″ style=”width: 177pt;” width=”236″>Type de demande</td>
    <td class=”xl64″ style=”width: 319pt;” width=”426″>Type d’offre</td>
    </tr>
    <tr style=”height: 14.4pt;”>
    <td class=”xl63″ style=”height: 14.4pt; border-top: none;” height=”19″>A</td>
    <td class=”xl64″ style=”border-top: none;”>Cotation</td>
    <td class=”xl64″ style=”border-top: none;”>Autre (préciser),E-Domaine I(préciser en commentaire)</td>
    </tr>
    <tr style=”height: 14.4pt;”>
    <td class=”xl65″ style=”height: 14.4pt; border-top: none;” height=”19″>A</td>
    <td class=”xl66″ style=”border-top: none;”>Autre</td>
    <td class=”xl66″ style=”border-top: none;”>z_Autre Réunion d’enclenchement</td>
    </tr>
    <tr style=”height: 14.4pt;”>
    <td class=”xl63″ style=”height: 14.4pt; border-top: none;” height=”19″>A</td>
    <td class=”xl64″ style=”border-top: none;”>Cotation</td>
    <td class=”xl64″ style=”border-top: none;”>E-Offre Toscane S ou I (préciser en commentaire)</td>
    </tr>
    <tr style=”height: 14.4pt;”>
    <td class=”xl65″ style=”height: 14.4pt; border-top: none;” height=”19″>A</td>
    <td class=”xl66″ style=”border-top: none;”>Cotation</td>
    <td class=”xl66″ style=”border-top: none;”>Autre (préciser)</td>
    </tr>
    <tr style=”height: 14.4pt;”>
    <td class=”xl63″ style=”height: 14.4pt; border-top: none;” height=”19″>A</td>
    <td class=”xl64″ style=”border-top: none;”>MEP</td>
    <td class=”xl64″ style=”border-top: none;”>E-Offre Toscane S ou I (préciser en commentaire)</td>
    </tr>
    </tbody>
    </table>

  • Lilian

    Membre
    7 mai 2024 à 11h17

    Bonjour David oui bien sûr :

    <table style=”border-collapse: collapse; width: 648pt;” border=”0″ width=”865″ cellspacing=”0″ cellpadding=”0″><colgroup><col style=”mso-width-source: userset; mso-width-alt: 7224; width: 152pt;” width=”203″> <col style=”mso-width-source: userset; mso-width-alt: 8391; width: 177pt;” width=”236″> <col style=”mso-width-source: userset; mso-width-alt: 15132; width: 319pt;” width=”426″> </colgroup>
    <tbody>
    <tr style=”height: 14.4pt;”>
    <td class=”xl63″ style=”height: 14.4pt; width: 152pt;” width=”203″ height=”19″>Nom affaire</td>
    <td class=”xl64″ style=”width: 177pt;” width=”236″>Type de demande</td>
    <td class=”xl64″ style=”width: 319pt;” width=”426″>Type d’offre</td>
    </tr>
    <tr style=”height: 14.4pt;”>
    <td class=”xl63″ style=”height: 14.4pt; border-top: none;” height=”19″>A</td>
    <td class=”xl64″ style=”border-top: none;”>Cotation</td>
    <td class=”xl64″ style=”border-top: none;”>Autre (préciser),E-Domaine I(préciser en commentaire)</td>
    </tr>
    <tr style=”height: 14.4pt;”>
    <td class=”xl65″ style=”height: 14.4pt; border-top: none;” height=”19″>A</td>
    <td class=”xl66″ style=”border-top: none;”>Autre</td>
    <td class=”xl66″ style=”border-top: none;”>z_Autre Réunion d’enclenchement</td>
    </tr>
    <tr style=”height: 14.4pt;”>
    <td class=”xl63″ style=”height: 14.4pt; border-top: none;” height=”19″>A</td>
    <td class=”xl64″ style=”border-top: none;”>Cotation</td>
    <td class=”xl64″ style=”border-top: none;”>E-Offre Toscane S ou I (préciser en commentaire)</td>
    </tr>
    <tr style=”height: 14.4pt;”>
    <td class=”xl65″ style=”height: 14.4pt; border-top: none;” height=”19″>A</td>
    <td class=”xl66″ style=”border-top: none;”>Cotation</td>
    <td class=”xl66″ style=”border-top: none;”>Autre (préciser)</td>
    </tr>
    <tr style=”height: 14.4pt;”>
    <td class=”xl63″ style=”height: 14.4pt; border-top: none;” height=”19″>A</td>
    <td class=”xl64″ style=”border-top: none;”>MEP</td>
    <td class=”xl64″ style=”border-top: none;”>E-Offre Toscane S ou I (préciser en commentaire)</td>
    </tr>
    </tbody>
    </table>

  • David

    Membre
    7 mai 2024 à 11h20

    Désolé mais ce n’est pas utilisable comme ça. Pourrais tu plutôt mettre à disposition les données dans un fichier Excel ou CSV ?

  • Lilian

    Membre
    7 mai 2024 à 11h23

    oui il faut juste que ej trouve comment je peux joindre un fichier à la conversation 🙂

  • David

    Membre
    7 mai 2024 à 11h28

    En haut de la page de conversation tu as un onglet Documents dans lequel tu peux publier un document. Alternativement tu peux partager un lien OneDrive

  • Lilian

    Membre
    7 mai 2024 à 11h33

    Bien vu, c’est fait merci

  • David

    Membre
    7 mai 2024 à 12h37

    A priori le problème vient de l’apostrophe dans “d’enclenchement”. Copie colle éventuellement la valeur de donnée de ton fichier. Il semble que l’apostrophe n’ait pas la même valeur selon l’origine des données.

  • Lilian

    Membre
    7 mai 2024 à 14h13

    j’ai essayé, je l’ai me^me retapé à la main rien n’y fait ça ne marche pas

  • Kévin

    Membre
    7 mai 2024 à 14h25

    Bonjour Lilian,

    Tout comme David, remplacer l’apostrophe a corrigé le soucis de mon côté.
    Si besoin, n’hésite pas à joindre un pbix directement avec le soucis qui persiste.

    Bonne journée

  • Lilian

    Membre
    7 mai 2024 à 15h50

    Merci pour vos retours mais je n’ai pas les résultats escompté. Je partage à nouveau un fichier excel. En fait je veux faire ressortir en “Non Conforme” les affaires ayant en type de demande 2 lignes dont 1 en “cotation” et 1 en “Autre” avec pour la demande Autre le type d’offre =”Pas bon”..Je n’y arrive pas 🙂

  • David

    Membre
    7 mai 2024 à 16h20

    Est-ce que le résultat correspond à tes attentes ?

Connectez-vous pour répondre.