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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors