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
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
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.