Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
in the straight table i have given the expression as below
=if(Metrics='Amount', sum({<[Primary Comparison Date]={'$(vMin)'}>}Amount),
if(Metrics='Description',only({<[Primary Comparison Date]={'$(vMin)'}>}Description),
if(Metrics='Modify Date',Date(only({<[Primary Comparison Date]={'$(vMin)'}>}[Modify date]),'MM/DD/YYYY'),
)))
i want to display the amount in the num format where if the amount has negative value it have show in the brackests (), how to achive this in the if loop
Try,
=if(Metrics='Amount',
if(sum({<[Primary Comparison Date]={'$(vMin)'}>}Amount)<0,
'(' & sum({<[Primary Comparison Date]={'$(vMin)'}>}Amount & ')',
sum({<[Primary Comparison Date]={'$(vMin)'}>}Amount
),
if(Metrics='Description',only({<[Primary Comparison Date]={'$(vMin)'}>}Description),
if(Metrics='Modify Date',Date(only({<[Primary Comparison Date]={'$(vMin)'}>}[Modify date]),'MM/DD/YYYY'),
)))
Thru num format we can't acheive this?
Hi Manoranjan,
Please Find attachment it may help you:
Thanks
Arvind Patil
i given this but this is not working in qliksense the reason is number format is in auto, due to this i can't achive this
suppose if i give money as num format #.##; (#.##) , now i m getting the result for negative in brackets, but for the date format is giving like number format
how to achieve this in qliksense?
Through num format we cant add characters as per my knowledge. Num format is there to achieve format flexibility.
Ok got it.. Just the -ve amount you need to display in ( ) and there is no need of negative symbol.. ryt?
try below,
=if(Metrics='Amount',
if(sum({<[Primary Comparison Date]={'$(vMin)'}>}Amount)<0,
'(' & fabs(sum({<[Primary Comparison Date]={'$(vMin)'}>}Amount)& ')',
sum({<[Primary Comparison Date]={'$(vMin)'}>}Amount
),
if(Metrics='Description',only({<[Primary Comparison Date]={'$(vMin)'}>}Description),
if(Metrics='Modify Date',Date(only({<[Primary Comparison Date]={'$(vMin)'}>}[Modify date]),'MM/DD/YYYY'),
)))
Hi,
try this
Num(sum({<[Primary Comparison Date]={'$(vMin)'}>}Amount),'$#,##0.00;($#,##0.00)')
I got to know about this.. Thanks