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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.