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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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