QlikPreSalesDACH / Qlik-Sense-Agent

The Qlik Sense Agent is a solution that helps you to enforce Governance for your entire Qlik landscape and to enable Governed Self Service
13 stars 3 forks source link

App card shows 0 Dimension if only 1 Dimension exist for an App (Same for Measure) #5

Closed mpignon closed 6 years ago

mpignon commented 6 years ago

If an application has only 1 Dimension, or only 1 Measure, the results show 0 Dimensions & 0 Measures: image

But in "QSA - Metadata App.qvf", we can see that my app has 1 Measure & 1 Dimension: image

mpignon commented 6 years ago

Indeed, in QSA.js, these expressions are false: DIMCOUNT = =if( substringcount(aggr(concat({<[Dimension]=>}[Dimension],','),[ID-App_ID]),',')>= 1, substringcount(aggr(concat({<[Dimension]=>}[Dimension],','),[ID-App_ID]),',')+1,0) MESCOUNT = =if( substringcount(aggr(concat({<[Measure]=>}[Measure],','),[ID-App_ID]),',')>= 1, substringcount(aggr(concat({<[Measure]=>}[Measure],','),[ID-App_ID]),',')+1,0)

image

And should be: DIMCOUNT = =if( len(aggr(concat({<[Dimension]=>}[Dimension],','),[ID-App_ID]))>= 1, substringcount(aggr(concat({<[Dimension]=>}[Dimension],','),[ID-App_ID]),',')+1,0) MESCOUNT = =if( len(aggr(concat({<[Measure]=>}[Measure]),[ID-App_ID]),',')>= 1, substringcount(aggr(concat({<[Measure]=>}[Measure],','),[ID-App_ID]),',')+1,0)

Or if you want to include the Drill Down Dimensions, simply: DIMCOUNT = =aggr(COUNT({<[Dimension]=>}[Dimension]),[ID-App_ID]) MESCOUNT = =aggr(COUNT({<[Measure]=>}[Measure]),[ID-App_ID])

image

image

QlikPreSalesDACH commented 6 years ago

Fixed with version 1.1.0