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
Anonymous
Not applicable

Tricky Concatenate DAX Formula

Hi Experts

 

I have the following dax formula which works fine to a certain limited. i want to change it so if the YTD,MTD and QTD is selected from the date calculation filter and when NO month is selected then the title should read "total revenue summary".

 

i cannot see my error...

 

Title - 1A Product Details = CONCATENATEX( VALUES( 'Date Calculations'[Date Calculation]), 'Date Calculations'[Date Calculation],", ") & " "  
     & IF(HASONEVALUE(DateFilter[Month Short Name]),"",CONCATENATEX (
            VALUES( DateFilter[Month Short Name]),
           DateFilter[Month Short Name],
                ", ")
            &" " & CONCATENATEX( VALUES( DateFilter[Year Nbr]),
                DateFilter[Year Nbr],
            ",")
            & "  Total revenue summary")
1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

The formula seems fine but the result may not be the desired one. Can you share a sample, please? Please mask sensitive parts first.

Do you really have a column of "YTD, MTD and QTD"?

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

The formula seems fine but the result may not be the desired one. Can you share a sample, please? Please mask sensitive parts first.

Do you really have a column of "YTD, MTD and QTD"?

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

It is difficult to give you an answer.  You would be well advised to use the Variables Syntax and work your way through the problem one step at a time.  Have a look at the video I did with Avi here.  Watch the video to see how I use VAR to solve complex nested DAX formulas, then apply the process to your formula.

 

https://www.youtube.com/watch?v=eOJkOWMYSkk 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Anonymous
Not applicable

Thanks Matt....

 

i give it a try

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.