cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
odada11
Helper I
Helper I

dax

Hello All, I am trying to write a measure that goes thus

State Groups =
IF ('Crossystate]="Unreconciled", "Unreconciled",
if ('crossystate]="paid", "Invoiced",
If ('crossystate]="Approved", "Invoiced",
if ('crossystate]="unpaid", "Notpaid",
 "Pending"
)))
Pls kindly 
2 ACCEPTED SOLUTIONS

Thank you so much
i tried it and it returned this error

odada11_0-1677202353096.png

 

View solution in original post

Hi @odada11 ,

Are you making it a calculated column? Try this and amend table name etc to fit your need...😎


State Groups = SWITCH(
    TRUE(),
    'Table'[Crossystate] = "unreconciled", "Unreconciled",
    'Table'[Crossystate] = "paid", "Invoiced",
    'Table'[Crossystate] = "approved", "Invoiced",
    'Table'[Crossystate] = "unpaid", "NotPaid",
    "Pending"
    
    )

TaylorPBI21_0-1677202967936.png

Many Thanks,

 

Taylor

 

LinkedIn: www.linkedin.com/in/taylordownes10 😊

View solution in original post

4 REPLIES 4
TaylorPBI21
Resolver I
Resolver I

Hi @odada11 ,


Try this...😎

 

New Calculated Column = SWITCH(

 

TRUE(),

[Crossystate]="Unreconciled", "Unreconciled",

[crossystate]="paid", "Invoiced",

[crossystate]="Approved", "Invoiced",

[crossystate]="unpaid", "Notpaid",

 "Pending"

)

 

Many thanks,

 

Taylor

Thank you so much
i tried it and it returned this error

odada11_0-1677202353096.png

 

Hi @odada11 ,

Are you making it a calculated column? Try this and amend table name etc to fit your need...😎


State Groups = SWITCH(
    TRUE(),
    'Table'[Crossystate] = "unreconciled", "Unreconciled",
    'Table'[Crossystate] = "paid", "Invoiced",
    'Table'[Crossystate] = "approved", "Invoiced",
    'Table'[Crossystate] = "unpaid", "NotPaid",
    "Pending"
    
    )

TaylorPBI21_0-1677202967936.png

Many Thanks,

 

Taylor

 

LinkedIn: www.linkedin.com/in/taylordownes10 😊

Thank you so much for your help, is there a way i can make all the "invoiced" appear as one in a drop down filter rather than have several Invoiced.

Really grateful for your help

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors