Forum Discussion
RonSwanson
6 years agoFrequent Visitor
SQL to DAX Conversion
Hi Experts, Looking to translate the below into DAX, but I have little experience. Any ideas? Thanks in advance. CASE WHEN (25000 < CASE WHEN [ReSignedMembers] is missing THEN 0 ELSE [ReSig...
- 6 years ago
Hi RonSwanson ,
The whole dax code may like this:
A = IF ( 25000 < IF ( ISBLANK ( [ReSignedMembers] ), 0, [ReSignedMembers] ) + IF ( ISBLANK ( [ConversionMembers] ), 0, [ConversionMembers] ) + IF ( ISBLANK ( [NewMembers] ), 0, [NewMembers] ) + IF ( ISBLANK ( [MaintenanceMembers] ), 0, IF ( [MaintenanceMembers] < 0, 0, [MaintenanceMembers] ) ), 25000, IF ( ISBLANK ( [ReSignedMembers] ), 0, [ReSignedMembers] ) + IF ( ISBLANK ( [ConversionMembers] ), 0, [ConversionMembers] ) + IF ( ISBLANK ( [NewMembers] ), 0, [NewMembers] ) + IF ( ISBLANK ( [MaintenanceMembers] ), 0, IF ( [MaintenanceMembers] < 0, 0, [MaintenanceMembers] ) ) )Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
6 years agoCommunity Champion
RonSwanson Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.