Forum Discussion

h4tt3n's avatar
h4tt3n
Helper V
5 years ago
Solved

DAX query without specific filter?

Hello,

 

I have a data table containing among other a timestamp, a numerical data value, and a data type:

 

 

The data is displayed in a report:

 

 

In the "Calibration" drop down menu you can see the three present datatypes. Notice the black curve over the red/green bar graph. This is data of datatype temperature, which is shown using the following DAX measure:

 

Supply temperature = calculate( selectedvalue( 'Data'[value] ), 'Data'[unittypeinputid] = 1511 )

 

What I would like to do is to always show the temperature curve no matter what datatypes are selected i the "Calibration" menu. 

 

I know there are ways to control filter context using  the filter pane and DAX filter functions, but after several hours of researching and experimenting I haven't been able to crack this nut. Any help is appreciated.

 

Thanks in advance, Mike

  • Anonymous's avatar
    Anonymous
    5 years ago
    Supply temperature = 
        calculate( 
            selectedvalue( 'Data'[value] ),
            'Data'[unittypeinputid] = 1511,
            ALL( 'Data'[datatype] )
        )

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable
    Supply temperature = 
        calculate( 
            selectedvalue( 'Data'[value] ),
            'Data'[unittypeinputid] = 1511,
            ALL( 'Data'[datatype] )
        )
    • Anonymous's avatar
      Anonymous
      Not applicable

      or:

      Supply temperature = 
          calculate( 
              selectedvalue( 'Data'[value] ),
              'Data'[datatype] = "temperature"
          )

       

    • h4tt3n's avatar
      h4tt3n
      Helper V

      It works exactly as it should! Anonymous Thanks for helping me out on this. Now comes the harder part, figuring out *how* it works...

      • Anonymous's avatar
        Anonymous
        Not applicable
        If you read the book "The Definitive Guide to DAX" by Marco Russo and Alberto Ferrari, you'll know everything about how DAX works.