Showing posts with label follows. Show all posts
Showing posts with label follows. Show all posts

Wednesday, March 21, 2012

measures visibility

Hi!

I have declared a measure as follows:

create [Measures].[Immobilien Anzahl];

([Measures].[Immobilien Anzahl], [Zeit].[Tag].MEMBERS) = ([Measures].[Immobilien je Tag Anzahl Original]);

([Measures].[Immobilien Anzahl], [Zeit].[Monat].MEMBERS) = ([Measures].[Immobilien je Monat Anzahl Original]);

([Measures].[Immobilien Anzahl], [Zeit].[Jahr].MEMBERS) = ([Measures].[Immobilien je Jahr Anzahl Original]);

Format_string([Measures].[Immobilien Anzahl])="#";

it works fine, but I dont want it to be visible. that's why I want to use the following codeline:

VISIBLE(([Measures].[Immobilien Anzahl])=0;

But I receive always this error message:

Error 1 Query (2724, 1) Parser: The syntax for 'VISIBLE' is incorrect. [Line:2724; Column:1] 0 0

I know that I can use the perspectives, but I would like to make it invisible hier.

How can I solve this problem?

Thank you for your help,

cvlasceanu


Try:

create MEMBER CurrentCube.[Measures].[Immobilien Anzahl] AS NULL

, VISIBLE = 1

, FORMAT_STRING = '#';

([Measures].[Immobilien Anzahl], [Zeit].[Tag].MEMBERS) = ([Measures].[Immobilien je Tag Anzahl Original]);

([Measures].[Immobilien Anzahl], [Zeit].[Monat].MEMBERS) = ([Measures].[Immobilien je Monat Anzahl Original]);

([Measures].[Immobilien Anzahl], [Zeit].[Jahr].MEMBERS) = ([Measures].[Immobilien je Jahr Anzahl Original]);

|||

I think he said he *did not* want it visible. So either use Vidas' suggestion but say VISIBLE=0 or you can use your original syntax and say:

create hidden [Measures].[Immobilien Anzahl];

|||

Furmangg,

my mistake, thanks for point this out. Of course I meant Visible=0.

Vidas Matelis

|||

It works, of course.

Thank you very much for your answers.

Best regards,

cvlasceanu

sql

Wednesday, March 7, 2012

MDX Query to display no records for empty rows

Hi,

I am facing with the following problem.

I am using bar chart to display my report.

My MDX query is as follows:

SELECT
NON EMPTY { [Measures].[SUM_COUNT] } ON COLUMNS,
TopCount ( Filter ( {[DIM].[NAME].[NAME]}, [Measures].[SUM_COUNT] <> 0 ) , 10, [Measures].[SUM_COUNT] ) ON ROWS
FROM
[USAGE]

where <criteria>

I want to show the topmost 10 records. For some criteria I get the results in the chart.

But for some criteria or say for wrong criteria, there are no records. In such a case the X-axis contains all values for {[DIM].[NAME].[NAME] and value for the Y-axis is all 0. Its kind of blank report it will restrict to 10 records.

In such a scenario I want to show a message to the user saying "No records found", which I have set in the No Rows property of the chart.

If I remove the TopCount clause then I get the above message, which is obvious.

So how do I acheive the same message but at the same time limiting the records to 10?

How can I acheive this in my scenario? Can something be done at the query end?

any help is appreciated.

Thanks in advance!

I could solve my problem by the following query

SELECT
NON EMPTY { [Measures].[SUM_COUNT] } ON COLUMNS,
NON EMPTY TopCount ( Filter ( {[DIM].[NAME].[NAME]}, [Measures].[SUM_COUNT] <> 0 ) , 10, [Measures].[SUM_COUNT] ) ON ROWS
FROM
[USAGE]

|||I have a similur problem. What I need to do is display a message to the user "No Records Found" if there query returns no hits? I knwo a way to do this with SQL, but i'm not sure how I can do this with in the SQL reporting services.

Thanks,|||What I ended up doing was adding a footer to the report and putting the following logic in that footer: =IIF(IsNothing(Fields!yourFieldHere), "No Records Found", "").

Hope it helps.

MDX Query to display no records for empty rows

Hi,

I am facing with the following problem.

I am using bar chart to display my report.

My MDX query is as follows:

SELECT
NON EMPTY { [Measures].[SUM_COUNT] } ON COLUMNS,
TopCount ( Filter ( {[DIM].[NAME].[NAME]}, [Measures].[SUM_COUNT] <> 0 ) , 10, [Measures].[SUM_COUNT] ) ON ROWS
FROM
[USAGE]

where <criteria>

I want to show the topmost 10 records. For some criteria I get the results in the chart.

But for some criteria or say for wrong criteria, there are no records. In such a case the X-axis contains all values for {[DIM].[NAME].[NAME] and value for the Y-axis is all 0. Its kind of blank report it will restrict to 10 records.

In such a scenario I want to show a message to the user saying "No records found", which I have set in the No Rows property of the chart.

If I remove the TopCount clause then I get the above message, which is obvious.

So how do I acheive the same message but at the same time limiting the records to 10?

How can I acheive this in my scenario? Can something be done at the query end?

any help is appreciated.

Thanks in advance!

I could solve my problem by the following query

SELECT
NON EMPTY { [Measures].[SUM_COUNT] } ON COLUMNS,
NON EMPTY TopCount ( Filter ( {[DIM].[NAME].[NAME]}, [Measures].[SUM_COUNT] <> 0 ) , 10, [Measures].[SUM_COUNT] ) ON ROWS
FROM
[USAGE]

|||I have a similur problem. What I need to do is display a message to the user "No Records Found" if there query returns no hits? I knwo a way to do this with SQL, but i'm not sure how I can do this with in the SQL reporting services.

Thanks,|||What I ended up doing was adding a footer to the report and putting the following logic in that footer: =IIF(IsNothing(Fields!yourFieldHere), "No Records Found", "").

Hope it helps.