This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function qlikNumberFromDate(d) { | |
| return d.getTime() / 86400000 + 25569; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| (function foo(node) { | |
| if (node && node.$id) { | |
| if (node.$$childHead) foo(node.$$childHead); | |
| if (node.$$nextSibling) foo(node.$$nextSibling); | |
| if (node.model && node.model.layout) node.model.layout.title = node.model.id; | |
| } | |
| })(qvangularGlobal.$rootScope); | |
| $('*').css('-webkit-user-select', 'all'); | |
| pubsub.publish('/resize/end') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define( ["require"], function ( localRequire ) { | |
| var path = localRequire.toUrl( "extensions/d3-vis-library/d3-vis-library.css" ); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // third expression: | |
| dual( sum(Volume), sqrt( sum(Volume) ) ) | |
| // or | |
| dual( sum(Betrag), pow( sum(Betrag), 0.7 ) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // can be used in scatter chart to have persistend color for dimensions and nice opacity for overlapping bubbles: | |
| =argb(180, | |
| subfield(textbetween(color(RowNo()),'(',')'),',',1), | |
| subfield(textbetween(color(RowNo()),'(',')'),',',2), | |
| subfield(textbetween(color(RowNo()),'(',')'),',',3)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Baskets order by Frequency: | |
| Concat(DISTINCT Product, ',', -Aggr(NODISTINCT Count(Product), Product)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // get amount of Dimensions | |
| var nDimensions = this.Data.Rows[0].filter(function(col){return !(col.color == undefined);}).length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // calculation of distance of two geo references (lat/lon): | |
| = 12742 * atan2(sqrt(sqr(sin(((lat2-lat1)*PI()/180)/2)) | |
| + (cos(lat1*PI()/180) * cos(lat2*PI()/180)) | |
| * pow(sin(((lon2-lon1)*PI()/180)/2),2)), | |
| sqrt(1 - (sqr(sin(((lat2-lat1)*PI()/180)/2)) | |
| + (cos(lat1*PI()/180) * cos(lat2*PI()/180)) | |
| * pow(sin(((lon2-lon1)*PI()/180)/2),2)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data: | |
| LOAD * INLINE [ | |
| Year, Product | |
| 2010, P1 | |
| 2011, P1 | |
| 2012, P1 | |
| 2010, P2 | |
| 2011, P2 | |
| 2011, P3 | |
| 2012, P3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function dateFromQlikNumber(n) { | |
| var d = new Date(Math.round((n - 25569) * 86400000)); | |
| // since date was created in UTC shift it to the local timezone | |
| d.setTime(d.getTime() + d.getTimezoneOffset() * 60000); | |
| return d; | |
| } |