function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Emma CherringtonEmma Cherrington 

How do I format the output of a SAQL query (Analytics) to include the $ sign and comma separators?

Hi,

Here is my query......

q = load "Plan_Number_MS";
q = group q by all;
q = foreach q generate sum('Plan') as 'sum_Plan';
q = limit q 2000;
p = load "Oppotunity_Inc_Martketing_Info";
p = filter p by 'ForecastCategory' in ["Closed", "Forecast"];
p = group p by all;
p = foreach p generate sum('ACV__c') as 'sum_ACV__c';
p = limit p 2000;
s = union p,q;
t = group s by all;
t = foreach t generate sum('sum_ACV__c') as 'thesumO' , sum('sum_Plan') as 'thesumP';
u = foreach t generate round((thesumP-thesumO),0) as 'Gap to Plan';

It is returning the right figure, but I need to format it as $1,234,567.......how do I do this please?

Thanks in advance

Emma
Best Answer chosen by Emma Cherrington
Alain CabonAlain Cabon
Hi,

Can you access the source JSON of your dashboard ? ( CTRL + E )

https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_xmd.meta/bi_dev_guide_xmd/bi_xmd_format_currency.htm

The easiest way to build dashboards in Analytics is to use the designer. However, if needed, you can further customize dashboards by editing their JSON files. The JSON defines the components of the dashboard and how they interact.

https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_json.meta/bi_dev_guide_json/bi_dbjson_intro.htm
 

All Answers

Alain CabonAlain Cabon
Hi,

Can you access the source JSON of your dashboard ? ( CTRL + E )

https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_xmd.meta/bi_dev_guide_xmd/bi_xmd_format_currency.htm

The easiest way to build dashboards in Analytics is to use the designer. However, if needed, you can further customize dashboards by editing their JSON files. The JSON defines the components of the dashboard and how they interact.

https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_json.meta/bi_dev_guide_json/bi_dbjson_intro.htm
 
This was selected as the best answer
Emma CherringtonEmma Cherrington
YES!  Thank you so much for pointing me in the right direction Alain!

dataset{}
dates[]
derivedDimensions[]
derivedMeasures
0
field"Gap to Plan"
format
customFormat"[\"$#,###.##\",1]"
label"Gap to Plan"
showInExplorertrue
dimensions[]
measures[]
organizations[]
showDetailsDefaultFields[]
Alain CabonAlain Cabon
Great, Emma. That still works. This feature is a bit hidden and I struggled a lot recently with these JSON files for a superbadge.
Best regards
Alain
Billy Jacobs 11Billy Jacobs 11
Alain, Emma, do you know how you got to this section? I've been trying to download the XMD of my data set but can't find where you put this in