# Pivot Table & Styleing

**URL:** <https://community.grafana.com/t/pivot-table-styleing/5197>\
**Category:** General\
**Created:** [February 1, 2018, 5:11pm UTC](https://community.grafana.com/t/pivot-table-styleing/5197 "2018-02-01T17:11:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisw](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@chrisw](https://community.grafana.com/u/chrisw)\
**Post date:** [February 1, 2018, 5:11pm UTC](https://community.grafana.com/t/pivot-table-styleing/5197/1 "2018-02-01T17:11:33Z")

</div>

Hey Guys,

Hunted for an answer but couldn’t find one. Due to some annoying limitations in PowerBI I am trying to find a better way to display basic dashboard info in a different solution. Tried Kibana but they dont support Pivot tables so trying Grafana.

What I want to achieve is a pivot/matrix table that displays information as follows:  
 ![image](https://us1.discourse-cdn.com/grafana/original/2X/b/beabb771ff72fce67c2a8bb6a1bc8da96e9973cb.png)

So the figures are where data matches the user and the month and then totals this all up. Is this possible?

The other thing I am unsure of is how to get currency to show the whole number rather than a short version.

Thanks

---

<div class="post-metadata">

**Author:** ![chrisw](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@chrisw](https://community.grafana.com/u/chrisw)\
**Post date:** [February 2, 2018, 9:04am UTC](https://community.grafana.com/t/pivot-table-styleing/5197/2 "2018-02-02T09:04:38Z")

</div>

Found a way to do the Pivot in SQL:

> ```
> SELECT User,
> ROUND(SUM(IF(Month = 'January', Profit, NULL)),2) AS Jan,
> ROUND(SUM(IF(Month = 'February', Profit, NULL)),2) AS Feb,
> ROUND(SUM(IF(Month = 'March', Profit, NULL)),2) AS Mar,
> ROUND(SUM(IF(Month = 'April', Profit, NULL)),2) AS Apr,
> ROUND(SUM(IF(Month = 'May', Profit, NULL)),2) AS May,
> ROUND(SUM(IF(Month = 'June', Profit, NULL)),2) AS Jun,
> ROUND(SUM(IF(Month = 'July', Profit, NULL)),2) AS Jul,
> ROUND(SUM(IF(Month = 'August', Profit, NULL)),2) AS Aug,
> ROUND(SUM(IF(Month = 'September', Profit, NULL)),2) AS Sep,
> ROUND(SUM(IF(Month = 'October', Profit, NULL)),2) AS 'Oct',
> ROUND(SUM(IF(Month = 'November', Profit, NULL)),2) AS Nov,
> ROUND(SUM(IF(Month = 'December', Profit, NULL)),2) AS 'Dec'
> FROM table
> WHERE (YEAR(`Date Ordered`) = YEAR(NOW()))
> GROUP BY User;
> 
> ```

So the only thing I still need to solve is making currency show as the whole number: e.g £10,000.00 instead of £10k

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [February 18, 2018, 4:43pm UTC](https://community.grafana.com/t/pivot-table-styleing/5197/3 "2018-02-18T16:43:00Z")

</div>

There isn’t a way to have that sort of fine control over the unit. Maybe setting the unit to none or locale and then write `Pounds (£)` in the axis label would be good enough:

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/7/714d3e519a76d4999c507eabf2029a7d47d64123.jpg)
