Closed mpignon closed 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)
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])
Fixed with version 1.1.0
If an application has only 1 Dimension, or only 1 Measure, the results show 0 Dimensions & 0 Measures:
But in "QSA - Metadata App.qvf", we can see that my app has 1 Measure & 1 Dimension: