Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Visuals input

Hello

 

How can I feed variables from the dashboard (e.g. filters, drop down selections, slicers) to DAX or Power Query?

E.g. select a value from a drop down in the dashboard and use it in DAX or Power Query?

Of course I will need to specify the available values in the slicer/visual.

 

Thanks!

  • Hi, Anonymous ;

    Calculated column is a static column of an entity, it cannot be changed according to the slicer in Table 1, so measure must be used, no relation is needed here.
    You can try to create measure as follows:

    measure = IF(MAX(Table2[Date])>min(Table1[Date]),"something","something else")

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

5 Replies

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Anonymous ;

    You can supply values from slicers to dax, using Max or SELECTEDVALUE:

    Measure = max('Table'[value])
    Measure 2 = SELECTEDVALUE('Table'[value])

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    Not applicable

    v-yalanwu-msft lbendlin  thanks but it does not seem to work.

     

    I have two tables:

    01/01/2001
    02/01/2001
    03/01/2001
    04/01/2001
    05/01/2001

     

    And:

    102/01/2001
    202/01/2001
    303/01/2001
    403/01/2001
    505/01/2001

     

    I use the first table to create a date range filter.

    Then I create a calculated column in the second table using:

    IF([Table2[Date]>MIN(Table1[Date],"something","something else")

     

    Then I insert the Table2 in a table/matrix visual.

     

    When I use the slicer to filter Table1, it does not filter Table2 via the DAX formula.

     

    Any idea? What are the methods to:

    1) link slicer/filters to filter other tables? do I need to create a virtual relationship in the data model?

    2) link slicer/filters to filter other tables using a transformation? e.g. add the number 5 to the slicer and then apply the result as a filter to another table

     

    Thanks 

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Anonymous ;

    Calculated column is a static column of an entity, it cannot be changed according to the slicer in Table 1, so measure must be used, no relation is needed here.
    You can try to create measure as follows:

    measure = IF(MAX(Table2[Date])>min(Table1[Date]),"something","something else")

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.