ContributionsMost RecentNewest TopicsMost LikesSolutionsRe: Dashboard filter date format in JAQL Perfect thanks David Re: Dashboard filter date format in JAQL thanks you David for looking Sisense contract with EIS and client is Allstate Benefit insurance EIS contact Victor Polotsky (vpolotsky@eisgroup.com) my contact Prakash Swami (pswami@allstate.com) please let me know any more details or setup quick call to walk through, this will really helps for my OCT 20th prod release in my side. Thanks Dashboard filter date format in JAQL I'm looking for two scenario 1. Sort default data filter desc 2. in JAQL object to set date filter to 'days', the following script is used and need your help on set date format to 'days' and sort to descending order...Help and How-To Current: without date only format Expect like this - date format and need descending ( max date first) attached the script and if any one suggest to add date format ("level": "days") and filter default display date descending order.... widget.on('initialized', function () { function runHTTP(jaql) { // Use $internalHttp service if exists const $internalHttp = prism.$injector.has("base.factories.internalHttp") ? prism.$injector.get("base.factories.internalHttp") : null; const ajaxConfig = { url: "/api/datasources/" + encodeURIComponent(jaql.datasource.title) + "/jaql", method: "POST", data: JSON.stringify(jaql), contentType: "application/json", dataType: "json", async: false, // Needed for WAT authentication xhrFields: { withCredentials: true } }; const httpPromise = $internalHttp ? $internalHttp(ajaxConfig, false) : $.ajax(ajaxConfig); // Return response return httpPromise; } function generateJAQL(datasourceTitle, dimension, sortOrder) { jaqlObj = { "datasource": { "title": datasourceTitle, }, "metadata": [ { "jaql": { "dim": dimension, "sort": sortOrder } } ], "offset": 0, "count": 1 } return jaqlObj; } //prism.activeDashboard.filters.clear(); //Clears current filters //alert('Dashboard filters cleared'); prism.activeDashboard.defaultFilters.forEach(function (filter, index) { //Loop through each default filter and apply to current dashboard filters if (index != prism.activeDashboard.defaultFilters.length - 1) { //Does not refresh filter if it is not the last filter //alert(index); prism.activeDashboard.filters.update(filter, { save: false, refresh: false, unionIfSameDimensionAndSameType: true }); } else {//Only refresh dashboard on the last filter // alert('last one'); prism.activeDashboard.filters.update(filter, { save: false, refresh: true, unionIfSameDimensionAndSameType: true }); } }) runHTTP(generateJAQL("smodel", "[Date_filter.date_list]", "desc")).then((API_Response) => { const filterObject = prism.activeDashboard.filters.item("[Date_filter.date_list]"); let firstValue = API_Response.data.values[0][0].data; filterObject.jaql.filter = { "explicit": true, "multiSelection": true, "members": [ // default select first (max) date firstValue ] } var dashboardRefreshedAfterFilter = false; if (dashboardRefreshedAfterFilter == false) { dashboard.refresh() } var dashboardRefreshedAfterFilter = true; }); }) Re: Data Model Publish got 404 error Sure will do David Data Model Publish got 404 error Team if any one of you facing the similar issue please share how to resolve this issue I have two environments Test and QC, 1. Create new data model (using live snowflake conn) with 2 dashboards in Test environment. 2. Export smodel from test and import to QC, Successfully published the model. later had some modification in data model in Test, upon successful validation and export *.smodel from Test to import to QC, while import to QC is successful but i can't publish this data model got the following error Error while running action: Unexpected error value: { isOperational: true, message: "Request failed with status code 404", code: undefined, statusCode: 404, method: But when i rename model to different name then its working and able to publish in QC. If you any one have the solution please let me know, thanks! Solved