Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
y5famfnatudu
Resolver I
Resolver I

Deneb Card containing Text + Bar Chart

Hello,

I'm trying to create a card using Deneb, the card should contain a Measure representing total revenue added as Text, and below it a bar chart that breaks the revenue by month.

I have created the bar chart with no problem, but when I add the Text Mark and add the measure to it, it is added to the chart as data points (which is not what I want)

 

This is my code:

{
  "data": {"name": "dataset"},
  "layer": [
    {
      "mark": {
        "type": "bar",
        "tooltip": true
      },
      "encoding": {
        "x": {
          "field": "Year Month short",
          "type": "nominal",
          "axis": null
        },
        "y": {
          "field": "Revenue",
          "type": "quantitative",
          "title": null,
          "axis": null
        },
        "color": {"value": "gray"}
      }
    }
  ]
}

 And this is the result

y5famfnatudu_0-1677576135765.png

Desired result

y5famfnatudu_1-1677576713827.png

Your help is so much appreciated.

 

Best regards,

Simon

1 ACCEPTED SOLUTION

I found the solution, it was very simple actually

"encoding": {
        "text": {
          "aggregate": "sum",
          "field": "Revenue",
          "type": "quantitative",
          "format": "#,##,,.00M;(#,##,,.00M)",
          "formatType": "pbiFormat"
        }
      }

It was this part of the code that aggregated the data points:

"aggregate": "sum"

 

View solution in original post

2 REPLIES 2
y5famfnatudu
Resolver I
Resolver I

A sample PBIX file can be found here:
https://cloud.degoo.com/share/OFPTR5znFMEcezYqdXK_RQ 

I found the solution, it was very simple actually

"encoding": {
        "text": {
          "aggregate": "sum",
          "field": "Revenue",
          "type": "quantitative",
          "format": "#,##,,.00M;(#,##,,.00M)",
          "formatType": "pbiFormat"
        }
      }

It was this part of the code that aggregated the data points:

"aggregate": "sum"

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors