Take a Pivot Table with two Dimensions and in Expression give it Sum(1) and Drag the Department drop at the Horizantal Position. and then go to genral tab take straight table go to the presentation tab in the same chart hide the Expression and then again go to the General Tab change the chart type from Straight to Pivot.
Thanks & Regards
Santhosh Kumar G
Your trick is interesting, it almost works. After turning my pivot table to straight table, hiding expression column, i get this (It can be done, directly in Straight table, turning "Horizontal" option on in Presentation tab) :
US UK FR JPN PRJ_1 PRJ_2 PRJ_3 PRJ_4 PRJ_5 PRJ_6 PRJ_7 PRJ_8 PRJ_9
When I switch back to pivot table, hidden colum re-appears...
It's close to what I need but I would like to have projects on different lines (and not columns) because of width space in my dashboard.
Have a look at the third chart on the right in the attached file. It does this:
Dimension = valueloop(1,7) // use as many as you might need
Expression = subfield(concat(PhaseDesc,','),',',valueloop(1,7))
There may be an easier way (I certainly hope there is, since this seems like such a basic requirement), but that's the first one that occurred to me when someone asked a similar question a few days ago.
DemandTestV2.qvw 169.0 K
Your requirement is mission impossible because there is no relationship between projects.
PRJ_1, PRJ_4, PRJ_6 and PRJ_9 should have a common value on vertical dimension, to be able to display in one row.
So you need to modify your data to relate the projects.
Maybe like this:
ProjectNo Project Department
1 PRJ_1 US
2 PRJ_2 US
3 PRJ_3 US
1 PRJ_4 UK
2 PRJ_5 UK
1 PRJ_6 FR
2 PRJ_7 FR
3 PRJ_8 FR
1 PRJ_9 JPN
Then you can create a pivot table with ProjectNo and Department as dimensions and Only(Project) as expression.
One problem with assigning a ProjectNo in the script is that then the number is fixed, so won't be responsive to selections. That means you could end up with blanks in the list if any of the projects are excluded by selections. Fortunately, we can assign a ProjectNo on the fly, in the chart itself, by using a valueloop() as demonstrated in my example above.