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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

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