Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear QV Experts,
In the dashboard, we have Metrics as Dollar, Case, Each
In the list box, the expression is,
Expression,
=If(Metrics ='Case',num(Sum({$<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerCases),'#,##0'),
If(Metrics ='Dollar',num(Sum({$<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerSales)/1000,'$#,##0'),
If(Metrics ='Each',num(Sum({$<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerEach)/1000,'#,##0'))))
But in the Sort,
=num(Sum({$<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerSales)/1000,'$ #,##0 K')
This is working for only if Metrics selected 'Dollar'
When i add 'IF' Condition, it is not working.
If(Metrics ='Dollar', num(Sum({$<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerSales)/1000,'$ #,##0 K') ,
num(Sum({$<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerCases)/1000,' #,##0 ') ))
Can you please suggest me.
Thanks
Thanks Sudhakar. It works for me now.
Before Change,
If(Metrics ='Dollar', num(Sum({$<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerSales)/1000,'$ #,##0 K') ,
num(Sum({$<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerCases)/1000,' #,##0 ') ))
After Change,
If(Metrics ='Dollar', num(Sum({<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerSales)/1000,'$ #,##0 K') ,
num(Sum({<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerCases)/1000,' #,##0 ') ))
you give the $ symbol unnecessarily some location in your expressions
Can you share some sample data to recreate the issue.
Thanks Sudhakar. It works for me now.
Before Change,
If(Metrics ='Dollar', num(Sum({$<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerSales)/1000,'$ #,##0 K') ,
num(Sum({$<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerCases)/1000,' #,##0 ') ))
After Change,
If(Metrics ='Dollar', num(Sum({<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerSales)/1000,'$ #,##0 K') ,
num(Sum({<Date={">=$(CYStartDate)<=$(vMaxDate)"}>} CustomerCases)/1000,' #,##0 ') ))