Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9219181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:03:09+00:00 2026-06-18T03:03:09+00:00

I have a problem with a MDX request: The following query gives me the

  • 0

I have a problem with a MDX request:

The following query gives me the good partial results

WITH 
 SET  [Paiments Encaisse] AS    { [Type Paiement].[Type Paiement Id].&[13]
    ,[Type Paiement].[Type Paiement Id].&[20]
    ,[Type Paiement].[Type Paiement Id].&[31]
    ,[Type Paiement].[Type Paiement Id].&[62]} 
MEMBER [Measures].[CA Encaissé]
AS
    SUM(
     [Paiments Encaisse],[Measures].[Montant HT Partage Encaisse]
    )
MEMBER Measures.[CA Encaissé-E] AS [Measures].[CA Encaissé]
MEMBER MEASURES.[CA Encaissé-H] AS 
([Measures].[CA Encaissé],[Hors En CDP].[Hors ou En CDP].&[False] )

SELECT 
{Measures.[CA Encaissé-E],MEASURES.[CA Encaissé-H]} ON 0,
NON EMPTY{ 
{[Hors En CDP].[Hors ou En CDP].&[True]} * VISUALTOTALS([Employes].[Hie Societe].MEMBERS)*
[CDP Propriétaire].[Centre de Profits].[All]

} ON 1
FROM NON VISUAL
( SELECT {[Employes].[Societe].&[1234]} ON 0,{[CDP Propriétaire].[Societe].&[1234]} ON 1 FROM [Prévisions] )
WHERE (
[Type Fantome].[Val].&[False],
[Date Facturation du Paiement].[Year].&[2011-01-01T00:00:00],
[Date Paiement].[Year].&[2011-01-01T00:00:00],
[Date Facturation Opération].[Year].&[2011-01-01T00:00:00])

However, the follwoing query, that aims at giving me the whole results, returns me less rows on the first part of the UNION than the first query, which baffles me

WITH 
 SET  [Paiments Encaisse] AS    { [Type Paiement].[Type Paiement Id].&[13]
    ,[Type Paiement].[Type Paiement Id].&[20]
    ,[Type Paiement].[Type Paiement Id].&[31]
    ,[Type Paiement].[Type Paiement Id].&[62]} 
MEMBER [Measures].[CA Encaissé]
AS
    SUM(
     [Paiments Encaisse],[Measures].[Montant HT Partage Encaisse]
    )
MEMBER Measures.[CA Encaissé-E] AS [Measures].[CA Encaissé]
MEMBER MEASURES.[CA Encaissé-H] AS 
([Measures].[CA Encaissé],[Hors En CDP].[Hors ou En CDP].&[False] )

SELECT 
{Measures.[CA Encaissé-E],MEASURES.[CA Encaissé-H]} ON 0,
NON EMPTY{ UNION
({[Hors En CDP].[Hors ou En CDP].&[True]} * VISUALTOTALS([Employes].[Hie Societe].MEMBERS)*
[CDP Propriétaire].[Centre de Profits].[All]
 , {[Hors en CDP].[Hors ou En CDP].&[False],[Hors en CDP].[Hors ou En CDP].[All]}
*  {[Employes].[Hie Societe].[All]} * 
       VISUALTOTALS  ([CDP Propriétaire].[Centre de Profits].ALLMEMBERS
  ),ALL
)} ON 1
FROM NON VISUAL
( SELECT {[Employes].[Societe].&[1234]} ON 0,{[CDP Propriétaire].[Societe].&[1234]} ON 1 FROM [Prévisions] )
WHERE (
[Type Fantome].[Val].&[False],
[Date Facturation du Paiement].[Year].&[2011-01-01T00:00:00],
[Date Paiement].[Year].&[2011-01-01T00:00:00],
[Date Facturation Opération].[Year].&[2011-01-01T00:00:00])

What’s more, the column Measures.[CA Encaissé-H] is always NULL in the second query, even on lines where there should be a value.

What I do not understand is why the results in the first part of the union are influenced by what happens in the second part. Could someone please explain it to me ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:03:10+00:00Added an answer on June 18, 2026 at 3:03 am

    META : I attached a big bounty to this question, so far, the only answer is a description of the effects, not the inner working of VISUALTOTALS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have within an MDX query the following calculated member: MEMBER [Asset].[Class].[Fixed Income Derivatives
I have a little Problem with a MDX-Query . I want show all the
Hallo at all! I have a little Problem with my Query in MDX. I
I have problem with my query on C, I’m using the oci8 driver. This
I'm new to MDX and have a problem regarding filtering out values from a
I have a MDX Dimension , whose main hierarchy has the following levels :
I have written a MDX query which works fine in SQL Server Management Studio.
I have problem with my SQL query I have T1: ID STATUS REPORTEDBY 1
i've some problem in query the data in mdx between two dates DateFrom and
I have problem to find a good namespace design and class order. Imagine we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.