You need to sign in to do that
Don't have an account?

Challenge Not yet complete... here's what's wrong: The 'Top Laptop Industry' lens does not appear to have the correct query. Please check the requirements and ensure everything is setup correctly.
Hello all, I receive the following message in Trailhead. I think that the exploration and filter are set up properly. I don't know what I am doing wrong. Would you please help?
1) https://developer.salesforce.com/forums/?id=9060G000000Ub6RQAS
2) https://developer.salesforce.com/forums/?id=9060G000000I3qxQAC
Let us know if this will help you
Thanks for your response. I checked the links you have provided, and it looks like there is a problem in the module and the developers are trying to fix it.
Best regards
Thanks for your response. I checked the links you have provided, and it looks like there is a problem in the module and the developers are trying to fix it.
Best regards
I was getting the 'lens does not appear to have the correct query' error, even after the above announcement that the challenge was fixed. My query looked correct -- but I knew that I had added the "Product Name" Group By first mistakenly (before adding the "Industry" Group By). Even though I deleted the "Product Name" group by (so that Industry was now first), and then re-added it, I got the malformed query error above.
I deleted my lens, started from scratch, and all worked well. "
quoted from: https://developer.salesforce.com/forums/?id=9060G000000I3qxQAC
In other words, you cannot modify an existing lens to pass this challenge, but must start a new lens from scratch, and apply each of the steps in the order directed in order to pass the challenge.
- Try editing the Lense JSON directly with [CTRL=E] or /JSON at the end and MAKE SURE the name is exactly Top_Laptop_Industry.
- Delete any Lens you may have named Top Laptop Industry to clear the name "space", then recreate.
E.G. - https://yourorgname-dev-ed.my.salesforce.com/analytics/wave/wave.apexp?tsid=02u1N000001DJe9#lens/0FK1N000000fQeUWAU/jsonHere's the top part of my Lens JSON
Hi all,
I have exactly the same issue; how can this be resolved?
Thanks,
Skender
{
"name": "Top_Laptop_Industry",
"label": "Top Laptop Industry",
"visualizationType": "stackhbar",
"state": {
"steps": {
"aggregateflex": {
"type": "aggregateflex",
"visualizationParameters": {
"visualizationType": "stackhbar",
"options": {}
},
"datasets": [
{
"id": "0Fb1t000000Ce7cCAC",
"name": "DTC_Opportunity_SAMPLE",
"label": "DTC Opportunity",
"url": "/services/data/v43.0/wave/datasets/0Fb1t000000Ce7cCAC"
}
],
"useGlobal": true,
"isGlobal": false,
"selectMode": "multi",
"broadcastFacet": false,
"receiveFacet": false,
"query": {
"measures": [
[
"sum",
"Amount"
]
],
"groups": [
"Industry",
"Product_Name"
],
"filters": [
[
"Product_Family",
[
"Laptops"
],
"in"
],
[
"Won",
[
"true"
],
"in"
]
],
"order": [
[
"sum_Amount",
{
"ascending": false
}
]
]
}
}
},
"widgets": {
"aggregateflex_chart": {
"type": "chart",
"parameters": {
"visualizationType": "stackhbar",
"autoFitMode": "keepLabels",
"theme": "wave",
"step": "aggregateflex",
"title": {
"label": "",
"fontSize": 14,
"subtitleLabel": "",
"subtitleFontSize": 11,
"align": "center"
},
"showValues": true,
"axisMode": "multi",
"dimensionAxis": {
"showAxis": true,
"showTitle": true,
"title": "",
"customSize": "auto",
"icons": {
"useIcons": false,
"iconProps": {
"column": "",
"fit": "cover",
"type": "round"
}
}
},
"measureAxis1": {
"sqrtScale": false,
"showAxis": true,
"customDomain": {
"showDomain": false
},
"showTitle": true,
"title": ""
},
"measureAxis2": {
"sqrtScale": false,
"showAxis": true,
"customDomain": {
"showDomain": false
},
"showTitle": true,
"title": ""
},
"legend": {
"show": true,
"showHeader": true,
"inside": false,
"descOrder": false,
"position": "right-top",
"customSize": "auto"
},
"tooltip": {
"customizeTooltip": false,
"showDimensions": true,
"dimensions": "",
"showMeasures": true,
"measures": "",
"showPercentage": true,
"showBinLabel": true
},
"trellis": {
"enable": false,
"showGridLines": true,
"flipLabels": false,
"type": "x",
"chartsPerLine": 4,
"size": [
100,
100
]
},
"applyConditionalFormatting": true,
"exploreLink": true,
"columnMap": {
"trellis": [],
"plots": [
"sum_Amount"
],
"dimensionAxis": [
"Industry"
],
"split": [
"Product_Name"
]
},
"normalize": false
}
}
}
},
"datasets": [
{
"id": "0Fb1t000000Ce7cCAC",
"name": "DTC_Opportunity_SAMPLE",
"url": "/services/data/v43.0/wave/datasets/0Fb1t000000Ce7cCAC"
}
]
}
Query was
{
"name": "Top_Laptop_Industry",
"label": "Top Laptop Industry",
"visualizationType": "stackhbar",
"state": {
"steps": {
"aggregateflex": {
"type": "aggregateflex",
"visualizationParameters": {
"visualizationType": "stackhbar",
"options": {}
},
"datasets": [
{
"id": "0Fb6F000000GcpYSAS",
"name": "DTC_Opportunity_SAMPLE",
"label": "DTC Opportunity",
"url": "/services/data/v43.0/wave/datasets/0Fb6F000000GcpYSAS"
}
],
"useGlobal": true,
"isGlobal": false,
"selectMode": "multi",
"broadcastFacet": false,
"receiveFacet": false,
"query": {
"measures": [
[
"sum",
"Amount"
]
],
"groups": [
"Industry",
"Product_Name"
],
"order": [
[
"sum_Amount",
{
"ascending": false
}
]
],
"filters": [
[
"Product_Family",
[
"Laptops"
],
"in"
],
[
"Won",
[
"true"
],
"in"
]
]
}
}
},
"widgets": {
"aggregateflex_chart": {
"type": "chart",
"parameters": {
"visualizationType": "stackhbar",
"autoFitMode": "keepLabels",
"theme": "wave",
"step": "aggregateflex",
"title": {
"label": "",
"fontSize": 14,
"subtitleLabel": "",
"subtitleFontSize": 11,
"align": "center"
},
"showValues": true,
"axisMode": "multi",
"dimensionAxis": {
"showAxis": true,
"showTitle": true,
"title": "",
"customSize": "auto",
"icons": {
"useIcons": false,
"iconProps": {
"column": "",
"fit": "cover",
"type": "round"
}
}
},
"measureAxis1": {
"sqrtScale": false,
"showAxis": true,
"customDomain": {
"showDomain": false
},
"showTitle": true,
"title": ""
},
"measureAxis2": {
"sqrtScale": false,
"showAxis": true,
"customDomain": {
"showDomain": false
},
"showTitle": true,
"title": ""
},
"legend": {
"show": true,
"showHeader": true,
"inside": false,
"descOrder": false,
"position": "right-top",
"customSize": "auto"
},
"tooltip": {
"customizeTooltip": false,
"showDimensions": true,
"dimensions": "",
"showMeasures": true,
"measures": "",
"showPercentage": true,
"showBinLabel": true
},
"trellis": {
"enable": false,
"showGridLines": true,
"flipLabels": false,
"type": "x",
"chartsPerLine": 4,
"size": [
100,
100
]
},
"applyConditionalFormatting": true,
"exploreLink": true,
"columnMap": {
"trellis": [],
"plots": [
"sum_Amount"
],
"dimensionAxis": [
"Industry"
],
"split": [
"Product_Name"
]
},
"normalize": false
}
}
}
},
"datasets": [
{
"id": "0Fb6F000000GcpYSAS",
"name": "DTC_Opportunity_SAMPLE",
"url": "/services/data/v43.0/wave/datasets/0Fb6F000000GcpYSAS"
}
]
}
That was actually the solution for the next one.I couldn't pass that one either
Apparently the order matters. :)
I was getting the same error again and again. Apparently the order matters.
Follow the steps in the order as they have been defined in the challenge... I have followed the same approach, instructions and as the result I have cleared the challenge...
steps:
Dataset: DTC Opportunity
Chart Type: Stacked Bar
Bars: Industry
Bar Segments: Product Name
Bar Length: Sum of Amount
Sort: Descending
Filters: Product Family Laptops
Filters: Won true
Lens Name: Top Laptop Industry
App: My Exploration
follow these steps one by one and if you are having any pre added lenses in your My Exploration app then delete all of them and save the current lens and run the app.
Below is the query:
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;
Thanks and Regards,
Akash Garg
Please like and share if I am able to help you with my answer.
I also faced same issue and tried to solve it, but suddenly I read out the whole assignmnet one more time and found that the order of steps are most important.
I think If we follow ordering of the steps as it is mentioned in the challenge, it will resolve your problem.
Thanks.
Be sure to do the steps in precise order. The challenge seems to rely on the tracking history feature of the Analytics Studio.
Best,
Dylan
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.
Please mark this as answer if this solves the issue.
Best Regards
Ranjeet Bhoyar
1. Select bar Industry
2. Select second bar product name
3. Bar length sum amount
4. Arrange descending
5. add filter1 - product family = laptop
6. add filter2 - won = true
7. arrange stacked bar
8. save lense Top Laptop Industry
9. Add both description
10. add app : my exploration
11. save
Then check
Please hit like button if it solves purpose :)
Under Bar Length just delete "Count of Rows" now save it again and checkout the challenge.
@fifedog15 I completely agree with you.
I would also like to add another bit of information to the steps. Please see the sort sequence!!
BUILD IN ORDER OF BULLET POINTS
Click on your Dataset: DTC Opportunity
Select Chart Type: Stacked Bar
Set Bars: Industry
Set Bar Segments: Product Name
Set Bar Length: Sum of Amount
Set Sort: Descending ( in the order of Industry, Product Name and finally Sum of Amount )
Set Filters: Product Family Laptops
Set Filters: Won true
Set Lens Name: Top Laptop Industry
Final chart should be as below!!
Save Lens into the App: My Exploration
Leave a like if this helped :)
There was an unhandled exception. Please reference ID: YMDWHGUX. Error: Restforce::ResponseError. Message: 550: Lens State conversion has failed. Cannot open lens with SAQL in API version below 40.0