企业绩效管理网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 509|回复: 4

Checking if view is empty from Excel

[复制链接]

77

主题

392

帖子

558

积分

高级会员

Rank: 4

积分
558
QQ
发表于 2014-3-17 03:04:00 | 显示全部楼层 |阅读模式
Any suggestions to the below?

I'm currently calling a TI from excel to change the elements contained in some subsets based on some search fields users are inputting to. These effectively generate a pretty decent search function in TM1 to generate a view. After this, the view utilising these subsets is then exported using VUSLICE back into Excel.

Requirement for the user to select more than one search field means that they can make a selection that results in an empty view. Once this is VUSLICE'd, I can obviously identify that there's not data and return a message to this effect but the act of VUSLICE on an empty view is the unfortunate circular reference that you get whenever you try to slice out an empty view.

So basically, although it doesn't affect the functionality of the file, it's annoying and I would like to check if the view is empty prior to exporting. My immediate thoughts are to run a second TI to count the number of processed records (simple counter on data tab) and pass back to excel if this is zero to identify the situation but wondering if I'm missing something simple which is a bit more elegant.

Any thoughts?

TIA
回复

使用道具 举报

67

主题

399

帖子

555

积分

高级会员

Rank: 4

积分
555
QQ
发表于 2014-3-17 04:19:26 | 显示全部楼层
Is it the fact their selections may have no data or that they forget to pick at least one value for each dim? If its the latter than a SUBSIZ check for zero could be easier, otherwise i think a TI to count records is probably the simplist plan.
回复 支持 反对

使用道具 举报

67

主题

416

帖子

566

积分

高级会员

Rank: 4

积分
566
发表于 2014-3-17 06:25:08 | 显示全部楼层
Na, I've got a check on the file before it calls to check that the elements exist before it tries to execute.  It's when they select more than one field that then returns no values (because the PO / Supplier that's selected doesn't have any info for example).

Looking at a cube with the }Clients dim to record a boolean in the cube once it processes the first line then quit the TI but trying to avoid calling any more TI's if it can be avoided.  Not the end of the world but if it can be avoided, would rather do something from excel's end.

Any other suggestions?
回复 支持 反对

使用道具 举报

66

主题

394

帖子

543

积分

高级会员

Rank: 4

积分
543
QQ
发表于 2014-3-17 07:02:12 | 显示全部楼层
exactly what I would do, create a TI which assembles the view with zero suppression on and put a counter on the data tab and return an error if the view is empty, catch that error before you do the vu slice and that should work fine.
回复 支持 反对

使用道具 举报

96

主题

400

帖子

617

积分

高级会员

Rank: 4

积分
617
QQ
发表于 2014-3-17 07:04:32 | 显示全部楼层
This came up about a month ago I think. Call a TI which processes the view ...
viewtopic.php?f=3&t=3865#p17391
If you just want to test the difference between an empty view and one that contains data my suggestion would be to increment a counter and bail out when the counter exceeds 1. that way a positive test won't get stuck processing the view if it happens to contain a lot of data.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|企业绩效管理网 ( 京ICP备14007298号   

GMT+8, 2020-7-2 18:13 , Processed in 0.230719 second(s), 13 queries , Memcache On.

Powered by Discuz! X3.1 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表