NB/ To make these modifications below you'll need to edit your widgets script and add these special scripts in. That guide is HERE
From Daniel Gomez https://community.tessituranetwork.com/tessitura_software_forums/f/tessitura_shared_reports-9/24079/analytics-date-time-functions
Here are some examples of using these functions that I threw together quickly. The secret to using these functions is that you must have a date/time column included in the widget, otherwise, SiSense has nothing to evaluate the functions against. Lots of much fancier ways to present the data you're interested in depending on the visualization that best tells the narrative you are trying to present. I've also included below a pretty simple script you can use to conditionally format the color of text within a Pivot Table column based on value.
Here are some examples of using these functions that I threw together quickly. The secret to using these functions is that you must have a date/time column included in the widget, otherwise, SiSense has nothing to evaluate the functions against. Lots of much fancier ways to present the data you're interested in depending on the visualization that best tells the narrative you are trying to present.
I've also included below a pretty simple script you can use to conditionally format the color of text within a Pivot Table column based on value.
//Text column formatting widget.on('ready', function(se, ev){ var evalCol = 4; //fidx val of column to evaluate var formatCol = $('td[fidx='+evalCol+']'); //jQuery pull entire eval column into array $.each(formatCol, function(a, b){ //function to loop through array if($(this).attr('val') > 0) { //evaluate text content of each cell in column's array. note: need to use JavaScript this instead of jQuery $(this), since textContent is a JavaScript attribute. $(this).css('color','green'); //set conditional styling } else if ($(this).attr('val') < 0) { $(this).css('color','red'); } }); });
Heath's notes
7608.ArshtCenter_SiSenseDateTimeFunctionExamples_2019-12-17.dash