Link to home
Start Free TrialLog in
Avatar of gvamsimba
gvamsimbaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

CASE statement equivalent to in DAC

hi , I m developing a powerbi matrix report and my row data is a look up column and I have to group  some values into one value ..

example - IF the column has values AB or BC or
CZ then display as New , IF values are FE of ZS then Old Else 

In SQL I can easily write CASE statement . My data source is sales force . can anyone plz give me the DAX query to achieve my requirement so tat I can then use tat column in my matrix rows ?
If I then pull  the customer counts in the data section will it group correctly ?

many thanks 
ASKER CERTIFIED SOLUTION
Avatar of Tom Farrar
Tom Farrar
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gvamsimba

ASKER

Perfect Tom, the below DAX Switch True worked like a charm.

vtest = SWITCH( TRUE(),[Recordtypename__c] = "Places Development OS","Open Market",
               [Recordtypename__c] = "Places Development SO","Shared Ownership",
               [Recordtypename__c] = "Places Development SE","Shared Equity",
               [Recordtypename__c])


Glad to hear..