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
kishoresakamuri
Frequent Visitor

expression in power bi

Hi,

can any one help on this how to create expression in power BI.

 

Sum(iif([Status] = "N/A" Or [Status] = "Out Of Scope" Or lcase([Status] = "de-scoped rbt" Or [Status]= "Deferred" Or [Status] = "Invalid", 0, 1))
- Sum([Column]) + Sum(iif([Status]= "N/A"
 Or [Status]= "Out Of Scope" Or lcase([Status]) = "de-scoped rbt" Or [Status]= "Deferred" Or [Status] = "Invalid", 1, 0))

1 ACCEPTED SOLUTION

Hi @kishoresakamuri,

 

Please do not add double quotes around the number 1 and 0. Please check the DAX in my orignal post again.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-qiuyu-msft
Community Support
Community Support

Hi @kishoresakamuri,

 

Please try to create a measure use SUMX() function like below:

 

=SUMX('<TableName>', IF([Status] = "N/A" || [Status] = "Out Of Scope" || [Status] = "de-scoped rbt" || [Status]= "Deferred" || [Status] = "Invalid", 0, 1))
- Sum([Column]) + SUMX('<TableName>', IF([Status] = "N/A" || [Status] = "Out Of Scope" || [Status] = "de-scoped rbt" || [Status]= "Deferred" || [Status] = "Invalid", 1, 0))

 

If above measure doesn't meet your requirement, please share sample data and expected results for our analysis.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HI

 

Error: The function SUMX takes an argument that evaluates to numbers or dates and cannot work with values of type String.

 

This is the error  i am facing when i create  below measure .

 SUMX(dim_test_lab,IF(dim_test_lab[current_user_defined_status]="N/A" ||dim_test_lab[current_user_defined_status]="Out Of Scope" || dim_test_lab[current_user_defined_status]="de-scoped rbt" || dim_test_lab[current_user_defined_status]="Deferred" || dim_test_lab[current_user_defined_status]="Invalid","0","1")) -SUM(dim_test_set[baseline_number]) + SUMX(dim_test_lab,IF(dim_test_lab[current_user_defined_status]="N/A" ||dim_test_lab[current_user_defined_status]="Out Of Scope" || dim_test_lab[current_user_defined_status]="de-scoped rbt" || dim_test_lab[current_user_defined_status]="Deferred" || dim_test_lab[current_user_defined_status]="Invalid","1","0"))

Hi @kishoresakamuri,

 

Please do not add double quotes around the number 1 and 0. Please check the DAX in my orignal post again.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

How can rank function defined in power bi actually i am new to Power Bi.

 

RANK() OVER (PARTITION BY TC.Project_id, TC.Release_id,TC.release_cycle_id, RELC.sprint_name, C.test_set_name,C.test_set_id ORDER BY TC.test_name,C.test_set_id) as baselined_test_rank

 

Regards,

Kishore Sakamuri.

Hi @kishoresakamuri,

 

As this issue is different from the original issue which should be a second issue, please post it as a new thread. Thanks for your understanding and support. Smiley Happy

 

By the way, you can find the syntax of DAX RANKX() from here https://msdn.microsoft.com/en-us/library/gg492185.aspx .

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi

 

Is there any live chat to calrify doubts.

This is forum support Smiley Happy. If you have any question about this issue, please feel free to post.

 

If you want to dedicated support, you can open a support ticket at the bottom of this site: https://powerbi.microsoft.com/en-us/support/ .

 

Best Regards,
Qiuyun Yu

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.