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
Brian KesslerBrian Kessler 

Einstein Analytics and Discovery Insights Specialist Challenge 4: How do I create the OEM Survey treemap?

I am currently struggling with Einstein Analytics and Discovery Insights Specialist Superbadge (https://trailhead.salesforce.com/en/content/learn/superbadges/superbadge_analytics_insights_specialist), Challenge 4.

I've "created" a chart with type "Treemap".

I've given it the SAQL query:
 
beattieSubscribers = load "Beattie_Subs";
oemSurveyResponses = load "Beattie_OEM_Survey";
oemGroups = group oemSurveyResponses by ('OEM');
rowCount = foreach oemGroups generate count() as 'rowCount';

When I run the query, I get the following table:
# rowCount
1     576
2     952
3     317
4     930
5     627

But instead of a chart, I get a little yellow triangle with an error message:
 
Can't use a treemap chart because the step requires 1 measure, and either 1-2 groups if trellis is disabled or 1-4 groupings if trellis is enabled.

How do I fix this?

 
SandhyaSandhya (Salesforce Developers) 
Hi,

I would suggest you refer below help article which will tell you the requirements for the measures of Treemap.

https://help.salesforce.com/articleView?id=000268802&language=en_US&type=1
 
https://help.salesforce.com/articleView?id=bi_chart_intro_treemap.htm&type=5
 
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya
 
Brian KesslerBrian Kessler
Hi @Sandhya,

Thanks for the response.
Maybe I'm a bit too obtuse, but I find your answer a bit too abstract.

Do I need to somehow tell Einstein that my measure is rowCount?
If so, how?

If not, then what?
Or what else?

It would be great to have some concrete examples of using SAQL with treemap.