# Problem with Expression

**URL:** <https://community.grafana.com/t/problem-with-expression/144474>\
**Category:** Grafana\
**Tags:** infinity-datasource, expressions\
**Created:** [February 20, 2025, 10:33am UTC](https://community.grafana.com/t/problem-with-expression/144474 "2025-02-20T10:33:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ritheshms7](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@ritheshms7](https://community.grafana.com/u/ritheshms7)\
**Post date:** [February 20, 2025, 10:33am UTC](https://community.grafana.com/t/problem-with-expression/144474/1 "2025-02-20T10:33:01Z")

</div>

Hi,

I have created a dashboard using infinity datasource. I have value from 2 queries as below,

1. “where “Month” == ‘Jan’ | pivot count(“Month”)”
2. “where “Month” == ‘Dec’ | pivot count(“Month”)”

These two queries are returning the numbers and I am using “stat” visulization to show the numbers. Now I want show the percentage or sum of these two numbers. So I used Expression in grafana and added Math expression $A + $B or ($A/$B)\*100. But this is returining no value.

Please help me here to do it in right way to get the number.

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [February 20, 2025, 10:51am UTC](https://community.grafana.com/t/problem-with-expression/144474/2 "2025-02-20T10:51:06Z")

</div>

Instead of expression math what if you tried out transformation create new field calculation option and sum them there

---

<div class="post-metadata">

**Author:** ![ritheshms7](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@ritheshms7](https://community.grafana.com/u/ritheshms7)\
**Post date:** [February 20, 2025, 11:07am UTC](https://community.grafana.com/t/problem-with-expression/144474/3 "2025-02-20T11:07:05Z")

</div>

![image](https://us1.discourse-cdn.com/grafana/original/3X/1/2/12db1bde8c0b57919696e0e34cb8f91060f5c92e.png)  
 ![image](https://us1.discourse-cdn.com/grafana/original/3X/7/4/74e538a22052f605d3a2dec109ff6e78f4cabdd8.png)  
Still the sum doesn’t show as the values are appearing from 2 different queries for same panel even after using transfermation.
