Skip to main content
Announcements
NEW Customer Portal: Initial launch will improve how you submit Support Cases. FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahdi
Contributor III
Contributor III

Problem in my pivot table

Hello Everyone, 

I have created a pivot table then I dragged and dropped the second attribute in order ro create a matrix, but it doesn't show me all my the rows in my database only  if I select a filter as you can see in the screenshots. Please help me resolve this problem.

Thank you for you Help.

9 Replies
stevejoyce
Specialist II
Specialist II

What is your pivot table measure expression?

 

Mahdi
Contributor III
Contributor III
Author

Does my problem come from this ?

stevejoyce
Specialist II
Specialist II

Maybe your selection is limiting to 1 "nom_niveau_couleur" and without selection there is many values so only() function is returning null.  Sorry i don't understand fully with details and language.  but that's reasonable to think.  What if you do count(nom_niveau_couleur) instead and show as number (or a 2nd expression).  Does this equal 1 where you expect it to?

Mahdi
Contributor III
Contributor III
Author

Yes, It worked but now it doesn't show me the colours .

stevejoyce
Specialist II
Specialist II

Did you change "Representation" to text?  I realized it was going to drop out the colours, I wanted to see what the count number it would return.  if it's more then 1 your only function would not work.

Mahdi
Contributor III
Contributor III
Author

Here is the result 

stevejoyce
Specialist II
Specialist II

So you have cells with > 1 color (seen now with your count(nom_niveau_couleur)).  You'll need to determine which color should be displayed in this scenario.  For example BETREMIEUX x C#.  Maybe its a max date you need to limit color by, or have a numeric colour equivalent and take max colour.  Or maybe your colour association doesn't match your pivot table when you thought it does.

But if you use only() and on a measure that has more then 1 value it will return null.  I believe this is your issue.

Mahdi
Contributor III
Contributor III
Author

So how can I get this right so It does show me the highest level or the highest colour ? 

stevejoyce
Specialist II
Specialist II

How do you want to determine "highest level".  Let's say you have  below where you want the colour_value used to determine which color to take (highest colour_value) in case of a tie

load * inline [

colour, colour_value

red, 10

blue, 9

green, 8

]

;

Try this calculation:

firstsortedvalue([colour], aggr(max(colour_value), [Nom_Complet], [Com_Technologie]))

Community Browser