Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
154 views
in Technique[技术] by (71.8m points)

Excel data model countif equivalent

I new to using data models with Excel. I have been successfully extracting specific values from the data model for a report using the cubemember function. What I am have trouble with is finding cube function equivalent for the normal excel function countif. I would like to count the occurrence of a specific value within a column of one the tables in my data model.

Here would be a very simplified example of one of the data model tables

enter image description here

And below is how I would like the excel report to look like, enter image description here

So within a cube function I would like get a count of the occurrences of 'A'.

The next functionality I would like to achieve is then to grab all of the corresponding serial numbers for 'A' and then output them into a single excel cell.

I have tried the following (where the cell reference $H$39 is the specific 'Type' being considered, in this case 'A'),

=CUBESETCOUNT(CUBESET("ThisWorkbookDataModel","[Table A].[Type].["&$H$39&"]")) But this simply returns a value of 1, rather than 4.

I am not sure even you to start the second query for grabbing the serial numbers.

question from:https://stackoverflow.com/questions/65623224/excel-data-model-countif-equivalent

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...