Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Creating Filter from mesure

Hello,

 

I would like to know if there is a DAX formula to create a filter using existing mesure. I would like that all the differentes values ( measures) Raw, Pack, P3rd, COGS OVE, ... are grouped in one measure in order to use a filter to switch between them easily.

 

Best regards,

 

Kerrout Anis

 

6 Replies

  • Hello Anonymous ,


    Not very clear. Request you to please elaborate with example so that we can help you.

     

  • Hi Anonymous ,

    If you want to be able to switch between measures by just clicking a button/slicer item, you can you the Field Parameters feature available as a preview in the May 2022 release of Power BI Desktop.  You can also use measure to filter another measure but depending the current filter context and your data model, the formula below might not give you the result you expect.

    NewMeasure =
    CALCULATE ( [MyMeasure], FILTER ( Table, Table[Column] = [MyOtherMeasure] ) )

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      thank you danextian , can you show me where is the Field Parameter ?

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello,

    It is impossible to create a filter from value. In my case ( screen) Raw , pack, P3rd, OVE are numbers. I would like to create a new column  composed of ( raw, pack, P3rd ,OVE)  so that i can use the filter that shows Raw , pack, P3rd, OVE.

    Bet regards,

    Kerout Anis