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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.