Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
johnnyjohn
Creator
Creator

Concatenate two measure in same table row

I have a measure of sales for one week, that looks like 

sum({<date= {">=$(=Date(weekstart(Today()-7)))<=$(=Date(weekend(Today()-7)))"}, Record_Type={'M'}>} Gross_Consideration_Eur )

and for another week that looks like 

sum({<date= {">=$(=Date(weekstart(Today()-14)))<=$(=Date(weekend(Today()-14)))"}, Record_Type={'M'}>} Gross_Consideration_Eur )

 

I want the row in a table to look like "200 (50%)" where 200 is the sum of sales for the most recent week and the (50%) comes from the percentage increase of one week to another, how do I concatenate these two values into one measure and format it properly? 

2 Replies
Kushal_Chawda

@johnnyjohn  try below

=Dual (
sum({<date= {">=$(=Date(weekstart(Today()-7)))<=$(=Date(weekend(Today()-7)))"}, Record_Type={'M'}>} Gross_Consideration_Eur )
&
'('
&
sum({<date= {">=$(=Date(weekstart(Today()-14)))<=$(=Date(weekend(Today()-14)))"}, Record_Type={'M'}>} Gross_Consideration_Eur )
&
')'
,
sum({<date= {">=$(=Date(weekstart(Today()-7)))<=$(=Date(weekend(Today()-7)))"}, Record_Type={'M'}>} Gross_Consideration_Eur )
)
 

lironbaram
Partner - Master III
Partner - Master III

hi 

just do it like this , 

= sum({<date= {">=$(=Date(weekstart(Today()-7)))<=$(=Date(weekend(Today()-7)))"}, Record_Type={'M'}>} Gross_Consideration_Eur )
& '(' & 
num(sum({<date= {">=$(=Date(weekstart(Today()-7)))<=$(=Date(weekend(Today()-7)))"}, Record_Type={'M'}>} Gross_Consideration_Eur )/
sum({<date= {">=$(=Date(weekstart(Today()-14)))<=$(=Date(weekend(Today()-14)))"}, Record_Type={'M'}>} Gross_Consideration_Eur ),'##0.0%') & ')'