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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.