Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Bonjour,
J'ai un souci sur un tableau croisé dynamique, où je souhaite afficher ou non mes indicateurs selon une dimension.
Ma table de faits est une table creuse constituée de trois types de faits.
La marque est renseignée pour tous les types et après les champs sont renseignés ou non selon le type.
Type | Marque | champA | champB | champC | champD |
---|---|---|---|---|---|
Commande | toto | renseigné | - | - | renseigné |
Commande | titi | renseigné | - | - | renseigné |
Réservation | toto | - | renseigné | - | - |
Achat | toto | - | - | renseigné | - |
Achat | titi | - | - | renseigné | - |
Achat | tutu | - | - | renseigné | - |
Mon but est d'obtenir le résultat suivant dans mon tableau dynamique :
TYPE | Commande | Réservation | Achat | |
MARQUE | A | D | B | C |
toto | ||||
titi | ||||
tutu |
Pour résumer, je voudrai que ma dimension type soit au dessus et que mon indicateur A soit affiché uniquement pour le type qui lui correspond. Actuellement les 4 indicateurs s'affichent pour chaque type (avec bien entendu des valeurs vides dès qu'un indicateur n'est pas renseigné pour le type). Cela semble assez logique car tout est dans une même table donc techniquement l'indicateur A existe pour tous les types, c'est juste qu'il est à vide pour certains.
Je pensais me servir du conditionnel sur les expressions mais si je dis sur mon indicateur A "if Type='Commande'" cela supprimer l'indicateur partout.
Avez-vous une idée ?
Merci d'avance,
Alexis.
Change your dimension order , Mark column (as per the example) as the 1st dimension then Type as the 2nd dimension and then do the Pivoting on the 2nd dimension i.e Type . That should give you the desired results
Hi Alexis,
I've Attached a sample app to replicate your desired output.
Please ensure you read and understand the load script as that is where the real trick is. This needs to be performed using Crosstable when you load your data. Google to find more info about it.
As of now you can refer to what i've done within the app.
Hi Alexis,
Has the solution worked for you?
Hi Vineeth,
Thx for your answer.
I have a problem with this solution :
Sometimes, I need a field to calculate another.
For example, "count(distinct if(champA=1,champC))". So i need champA and champC on each line and i can't put champA in CrossTable, am i wrong ? But if i don't put champA in CrossTable, i will have champA for each type.
Hi Alexis,
Can you post sample data and a sample dashboard in excel ?
What is this expression evaluating? count(distinct if(champA=1,champC))