Forum Discussion

Lazy's avatar
Lazy
New Member
8 years ago
Solved

How to make a measure invariable ?

Hi, 

 

I have to calculate a value of items which will be used as a denominator. But, I don't want it to be filtered !

 

Here's my formula : 

QteRebutGlobal = calculate( sum(ExtractionProduction[QteRebut]); extractionPrudction[CodeDefaut] <> "QRC");

 

When I make a Table with CodeDefaut as first column and QteRebutGlobal as second one, QteRebutGlobal is not unchanging !

 

I tried that :

QteRebutGlobal = calculate( sum(ExtractionProduction[QteRebut]); filter( all(extractionPrudction[CodeDefaut]); extractionPrudction[CodeDefaut]  <> "QRC"));

 

But it makes the same result. 

 

Sorry for the mistakes but I am french :s

Thank you !

 

  • Lazy's avatar
    Lazy
    8 years ago

    Thank you for your answer, I'm a beginner with DAX...

     

    In fact, the measure I want to calculate is a denominator for an other one, so it has to be unchanging despite the chart X-axis or chart legend.

     

    However, I found the solution, I discovered how to use "ALL()" !


2 Replies

  • The two versions of the formula are equivalent.  The first one you wrote is just shorthand for the second one. 

     

    But I am not clear no what you mean by "I have to calculate a value of items which will be used as a denominator. But, I don't want it to be filtered !" ?

    Best to provide table inputs and desired output so someone can assist.

    • Lazy's avatar
      Lazy
      New Member

      Thank you for your answer, I'm a beginner with DAX...

       

      In fact, the measure I want to calculate is a denominator for an other one, so it has to be unchanging despite the chart X-axis or chart legend.

       

      However, I found the solution, I discovered how to use "ALL()" !