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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
ToniMuñoz
Frequent Visitor

Help! send measure using REST API

Hello!

I have created Dataset (using rest api) with simple measure and code is ok.

Like this :

      'measures': [
        {
          'name': 'Totales',
          'expression': 'sum(Data[Pendientes])',
          'formatString': '0'
        }
      ]
But when i use filters 
      'measures': [
        {
          'name': 'Totales',
          'expression': 'calculate(MAX(Data[Pendientes]),FILTER(Data,Data[TIPO]="T")))',
          'formatString': '0'
        }
      ]
I have a problem with quotation marks, i try with simple, double, but now i cant create dataset... if i remove the expression for simple its ok. 
Can u help me?
 
Sorry @ my english!
1 REPLY 1
ToniMuñoz
Frequent Visitor

Solved with this Measure

 

      'measures': [
        {
          'name': 'Totales2',
          'expression': 'calculate(sum(Data[Pendientes]),filter(Data,Data[ID]=MAX(Data[ID]) && Data[TIPO]=""T""))',
          'formatString': '0'
        }
      ]
 

 

My problem was not in quote marks i thik that measure was not correct. 

 

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.