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

IF Formula and Concatenate

Hi Team,

 

Can some one help me with the below Excel formula.

 

i have tried building this but i was geting the argumental error.

 

=IF(Outcome ="lost","Lost",IF(Outcome ="declined","Declined",IF(OUTCOME="won",CONCATENATE(FiscalMonthofClose," ","wins"),IF(AnticipatedWinDate < 28-06-2019,"Past Due",IF(AnticipatedWinDate < 02-08-2019,"Jul FC",IF(AnticipatedWinDate < 30-08-2019,"Aug FC",IF(AnticipatedWinDate < 27-09-2019,"Sept FC",IF(AnticipatedWinDate < 01-11-2019,"Oct FC",IF(AnticipatedWinDate < 27-12-2019,"Nov FC",IF(AnticipatedWinDate < 31-01-2020,"Dec FC",IF(AnticipatedWinDate < 28-02-2020,"Jan FC",IF(AnticipatedWinDate < 27-03-2020,"Feb FC",IF(AnticipatedWinDate < 01-05-2020,"March FC",IF(AnticipatedWinDate < 29-05-2020,"April FC",IF(AnticipatedWinDate < 03-07-2020,"May FC",IF(AnticipatedWinDate < 03-07-2021,"June FC","FY20"))))))))))))))))

 

Kindly let me know if i can add this to BI.

 

Regars,

Ranjan

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @RanjanThammaiah ,

This issue should more related to your dax formula concatenate function part(concatenate can only used to merge two text), you have typing wrong format. I fix this issue and share the sample below, you can try it if works.

Measure =
IF (
    Outcome = "lost",
    "Lost",
    IF (
        Outcome = "declined",
        "Declined",
        IF (
            OUTCOME = "won",
            CONCATENATE ( FiscalMonthofClose, " wins" ),
            IF (
                AnticipatedWinDate < 28 - 06 - 2019,
                "Past Due",
                IF (
                    AnticipatedWinDate < 02 - 08 - 2019,
                    "Jul FC",
                    IF (
                        AnticipatedWinDate < 30 - 08 - 2019,
                        "Aug FC",
                        IF (
                            AnticipatedWinDate < 27 - 09 - 2019,
                            "Sept FC",
                            IF (
                                AnticipatedWinDate < 01 - 11 - 2019,
                                "Oct FC",
                                IF (
                                    AnticipatedWinDate < 27 - 12 - 2019,
                                    "Nov FC",
                                    IF (
                                        AnticipatedWinDate < 31 - 01 - 2020,
                                        "Dec FC",
                                        IF (
                                            AnticipatedWinDate < 28 - 02 - 2020,
                                            "Jan FC",
                                            IF (
                                                AnticipatedWinDate < 27 - 03 - 2020,
                                                "Feb FC",
                                                IF (
                                                    AnticipatedWinDate < 01 - 05 - 2020,
                                                    "March FC",
                                                    IF (
                                                        AnticipatedWinDate < 29 - 05 - 2020,
                                                        "April FC",
                                                        IF (
                                                            AnticipatedWinDate < 03 - 07 - 2020,
                                                            "May FC",
                                                            IF ( AnticipatedWinDate < 03 - 07 - 2021, "June FC", "FY20" )
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )
)

What logic you used to calculate financial date? Can you please share more detail? It can used to reduce the complexity of your formula and make it more 'dynamically'.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

We have set of fixed dates which doesnt change.

 

It depends on my Company Financial close dates. But this will be fixed for an year from now.

 

DatesFinancial Close
28-Jun-19Past Due
02-Aug-19July
30-Aug-19August
27-Sep-19September
01-Nov-19October
29-Nov-19November
27-Dec-19December
31-Jan-20January
28-Feb-20February
27-Mar-20March
01-May-20April
29-May-20May
03-Jul-20June

 

 

Anonymous
Not applicable

take a look at using the switch function:

https://docs.microsoft.com/en-us/dax/switch-function-dax

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.