Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have posted previously with a overly simplified description and some have advised better to create an example. So I am reposting with the example. I've tried to provide in the example the question I'm trying to find an answer to whether it's possible or not. Here is another brief summary of the request.
I have a table filled with two item types (there are more in the model but for this example you only need to know about two). One item type informs a slicer for user value selection. The other item is to be displayed in a table. I need to calculated a value from the user selection that informs the filtering of the table visual displaying the other item type. But hopefully the attached file gives a better understanding of what I'm trying to accomplish.
Solved! Go to Solution.
Hi,ryan_mayu ,thanks for your concern about this issue.
And I would like to share some additional solutions below.
Hi,@Aklys .I am glad to help you.
Like this?
I noticed that you are using fields from the same table as slicers, but in order to avoid the direct filtering effect, you have turned off the slicer interaction!
This is causing the problem you are experiencing: when the slicer selects values, the table is not affected in any way (including the measure placed in it)
As you can see my newly created table does not have this feature turned off, so the filtered data is null.
You should create a new table as an option to the slicer, and not create a relationship (to avoid direct filtering, where the slicer only passes values, and the filtering is achieved by affecting the value of the measure)
like this.
Create a new slicer table and copy a table just for displaying the data (the copied table should not create a relationship with the original table (to avoid filtering by the relationship)).
SlicerTable = SUMMARIZE('Items','Items'[Parent_Id],'Items'[Status_Update__Date],'Items'[Type])
ItemShowData = 'Items'
The relationship:
I modified your measure to show results for date types (which later need to be filtered by date)
I recreated a measure, and kept your measure.
use table[Items] in measure
Filter_ValueTest = VAR UserSelected = SELECTEDVALUE('SlicerTable'[Status_Update__Date])
VAR ParentID = MIN(Parents[Id])
VAR FilterDate = CALCULATE(MIN(Items[Key_Date__Date]), FILTER(ALL(Items), Items[Key_Date__Date] > UserSelected && Items[Parent_Id] = ParentID))
RETURN
IF(ISBLANK(FilterDate), UserSelected, FilterDate)
Displaying Data with table [ItemShowData]
The reason for creating a new table to display the data is that you are using the ALL function in your measure, and the ALL function creates a new computational environment (the filters in the virtual table: remove all external filters, which in turn causes the original table visual to display the measure [Filter_ValueTest] once it has been displayed), and the measurement's computational environment will directly affect the actual data displayed in the visual. So I need to make sure that all the fields displayed in the table visual have no relationship with the measure [Filter_ValueTest] and do not filter each other, so I need to create a new table to display the data.
M_showDates =
VAR _keyDate =MIN('ItemShowData'[Key_Date__Date])
VAR _testValue =[Filter_ValueTest]
// You can see that there is no direct filtering between these two tables, so there is no impact when using the related measure in a visual
// The computational context of the measure does not affect the rest of the content.
RETURN
IF( _keyDate >= _testValue ,1,0)
Final filtering of records with [M_showDates] = 1
The environment of the calculation due to the combined filtering of DAX directly affects the final result, which you need to be aware of and double-check.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,ryan_mayu ,thanks for your concern about this issue.
And I would like to share some additional solutions below.
Hi,@Aklys .I am glad to help you.
Like this?
I noticed that you are using fields from the same table as slicers, but in order to avoid the direct filtering effect, you have turned off the slicer interaction!
This is causing the problem you are experiencing: when the slicer selects values, the table is not affected in any way (including the measure placed in it)
As you can see my newly created table does not have this feature turned off, so the filtered data is null.
You should create a new table as an option to the slicer, and not create a relationship (to avoid direct filtering, where the slicer only passes values, and the filtering is achieved by affecting the value of the measure)
like this.
Create a new slicer table and copy a table just for displaying the data (the copied table should not create a relationship with the original table (to avoid filtering by the relationship)).
SlicerTable = SUMMARIZE('Items','Items'[Parent_Id],'Items'[Status_Update__Date],'Items'[Type])
ItemShowData = 'Items'
The relationship:
I modified your measure to show results for date types (which later need to be filtered by date)
I recreated a measure, and kept your measure.
use table[Items] in measure
Filter_ValueTest = VAR UserSelected = SELECTEDVALUE('SlicerTable'[Status_Update__Date])
VAR ParentID = MIN(Parents[Id])
VAR FilterDate = CALCULATE(MIN(Items[Key_Date__Date]), FILTER(ALL(Items), Items[Key_Date__Date] > UserSelected && Items[Parent_Id] = ParentID))
RETURN
IF(ISBLANK(FilterDate), UserSelected, FilterDate)
Displaying Data with table [ItemShowData]
The reason for creating a new table to display the data is that you are using the ALL function in your measure, and the ALL function creates a new computational environment (the filters in the virtual table: remove all external filters, which in turn causes the original table visual to display the measure [Filter_ValueTest] once it has been displayed), and the measurement's computational environment will directly affect the actual data displayed in the visual. So I need to make sure that all the fields displayed in the table visual have no relationship with the measure [Filter_ValueTest] and do not filter each other, so I need to create a new table to display the data.
M_showDates =
VAR _keyDate =MIN('ItemShowData'[Key_Date__Date])
VAR _testValue =[Filter_ValueTest]
// You can see that there is no direct filtering between these two tables, so there is no impact when using the related measure in a visual
// The computational context of the measure does not affect the rest of the content.
RETURN
IF( _keyDate >= _testValue ,1,0)
Final filtering of records with [M_showDates] = 1
The environment of the calculation due to the combined filtering of DAX directly affects the final result, which you need to be aware of and double-check.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much for the detailed information. That definitely gave me a working solution. I had to change the formula you provided because your one had changed the direction of what it what should be displayed and was showing future rather than only one future record and then all the other historical ones.
Thank you very much again for the thorough explanation. I still need to wrap my head around it fully. But it seems to be delivering my desired result.
i can't open the link, could you pls upload to onedrive?
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
70 | |
43 | |
31 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |