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
ash p 10ash p 10 

Tableau CRM

The 'Top Laptop Industry' lens does not appear to have the correct query. Please check the requirements and ensure everything is setup correctly.
ANUTEJANUTEJ (Salesforce Developers) 
Hi Ash,

>> https://community.tableau.com/s/explore-forums?_gl=1*5g3xc8*_ga*OTIwODc2ODc1LjE2MjM3NzkzMDc.*_ga_8YLN0SNXVS*MTYyMzc3OTMwNy4xLjAuMTYyMzc3OTMwNy4w&_ga=2.139923568.2134720362.1623779310-920876875.1623779307

As you have mentioned the question is in regards to tableau you can check the above link that is forum link to get more attention and more help.

Please try posting in the above link to get correct traction and audience in tableau.

Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.  

Thanks.
mukesh guptamukesh gupta
Hi,

Please use below code:-

Trailhead bots are looking for the exact match of the query resulted from the lens.

Following are two different queries resulting same Lens visualisation Query when you select Won as first filter and Product Family as Second filter
q = load "DTC_Opportunity_SAMPLE";
q = filter q by 'Won' == "true";
q = filter q by 'Product_Family' == "Laptops";
q = group q by ('Industry', 'Product_Name');
q = foreach q generate 'Industry' as 'Industry', 'Product_Name' as 'Product_Name', sum('Amount') as 'sum_Amount';
q = order q by 'sum_Amount' desc;
q = limit q 2000;

Query when you select Product Family as first filter and Won as Second filter
 
q = load "DTC_Opportunity_SAMPLE";
q = filter q by 'Product_Family' == "Laptops";
q = filter q by 'Won' == "true";
q = group q by ('Industry', 'Product_Name');
q = foreach q generate 'Industry' as 'Industry', 'Product_Name' as 'Product_Name', sum('Amount') as 'sum_Amount';
q = order q by 'sum_Amount' desc;
q = limit q 2000;


Second query is what trainlhead bots are expecting, Therefore, you may correct the sequence of the filters to pass the challange.

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh
ikle rthhytikle rthhyt
Hey, how can I integrate the scirpt in a simple content based blog? I want to add it in my crossbow blog (https://www.bowadvisor.com/best-crossbow-under-500/).