Forum Discussion
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
- lbendlinSuper User
This is done automatically via the filter context.
- v-yalanwu-msftCommunity 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. - AnonymousNot 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:
1 02/01/2001 2 02/01/2001 3 03/01/2001 4 03/01/2001 5 05/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
- lbendlinSuper User
Don't forget that you have a filter context. You need to aggregate Table2[Date].
See the attached pbix.
- v-yalanwu-msftCommunity 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.