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

Can we use Dual() to combine two measures ?

Hello everyone,

I have a requirement where I have to show multiple measures in a line chart on a single axis. My current data is monthwise Sales and Target

Month Sales Target
Apr 185 95
May 56 95
June 0 95
July 0 158
Aug 0 158
Sep 0 158
Oct 0 375
Nov 0 182
Dec 0 182
Jan 0 201
Feb 0 201
Mar 0 296

 

Now I have to calculate another measure Achievement% using sales and target formula for the same is (Sales/Target)*100 and show this measure besides Sales data point label on the same axis

Current Representation:

Aditya_Chitale_0-1652156637115.png

 

Required representation:

Aditya_Chitale_1-1652156813611.png

Any help would be appreciated.

 

Regards,

Aditya

Labels (6)
1 Solution

Accepted Solutions
Aditya_Chitale
Specialist
Author

Thanks for your reply but the issue got resolved after changing the number formatting of my measure to "measure expression".

Regards,

Aditya

View solution in original post

4 Replies
tresesco
MVP

Like this:

tresesco_0-1652159520081.png

Dual(Sum(Target)&
If(Sum(Sales)>0,'(' &Num(Sum(Sales)/Sum(Target), '##.#%')&')')
, Sum(Target))

Aditya_Chitale
Specialist
Author

I have used same method. But % values are not showing in bracket besides Sales values.

Expression used:

Dual(
Sum({<DATE={">=$(=Date(YearStart(max(DATE),0,4)))<=$(=Date(monthend(yearstart(max(DATE),0,4))))"}>}Agreement_Value__c)
&
if(
(Sum({<DATE={">=$(=Date(YearStart(max(DATE),0,4)))<=$(=Date(monthend(yearstart(max(DATE),0,4))))"}>}Agreement_Value__c))>0
,
'(' &
num(
Sum({<DATE={">=$(=Date(YearStart(max(DATE),0,4)))<=$(=Date(monthend(yearstart(max(DATE),0,4))))"}>}Agreement_Value__c)
/
Sum({<DATE={">=$(=Date(YearStart(max(DATE),0,4)))<=$(=Date(Monthend(yearStart(max(DATE),0,4))))"}>}[AOP Target])
,'##.#%'     &')'
)
)
,
Sum({<DATE={">=$(=Date(YearStart(max(DATE),0,4)))<=$(=Date(monthend(yearstart(max(DATE),0,4))))"}>}Agreement_Value__c)
)

 

Regards,

Aditya

tresesco
MVP

Could you share your sample file where the issue could be seen?

Aditya_Chitale
Specialist
Author

Thanks for your reply but the issue got resolved after changing the number formatting of my measure to "measure expression".

Regards,

Aditya