Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
psfard85
Frequent Visitor

Using Selectecvalue() for filtering a summerized Table

Hi everybody,

here is my problem; I wrote this Dax and it is working flawlessly:

TTBL =
                 var tableSummerize=
                          CALCULATETABLE(
                                    SUMMARIZE(
                                         Sheet1,
                                         Sheet1[Group],
                                         Sheet1[DATES.jyear],
                                          "Total",SUM(Sheet1[amount]
                                   ),
                           FILTER(Sheet1,Sheet1[Group]="Tile")
                            )
return
                 tableSummerize
 
 
However,when I trying to using slicer and rewtire my dax to this : 
 
 
TTBL =
                 var tableSummerize=
                          CALCULATETABLE(
                                    SUMMARIZE(
                                         Sheet1,
                                         Sheet1[Group],
                                         Sheet1[DATES.jyear],
                                          "Total",SUM(Sheet1[amount]
                                   ),
                           FILTER(Sheet1,Sheet1[Group]=Selectedvalue(Sheet1[Group])
                            )
return
                 tableSummerize
 
then I select one specific Group name in slicer :  it returns NOTHING!!!!! 
 
could somebody explain for me why ?
 
 
1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @psfard85 

According to your dax you provide , Here are my understand for your question:

(1)If you use "New Table" to return a table , it cannot use the SELECTEDVALUE() function because  the filtering context of the slicer cannot be obtained in the new table. 

(2)If you define the table in a measure, if you filter the slicer, the current filter context is automatically modified back, and we don't need to modify the current filter context as shown.

For your needs, you can provide some trusted input and output sample data so that we can better help you.

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @psfard85 

According to your dax you provide , Here are my understand for your question:

(1)If you use "New Table" to return a table , it cannot use the SELECTEDVALUE() function because  the filtering context of the slicer cannot be obtained in the new table. 

(2)If you define the table in a measure, if you filter the slicer, the current filter context is automatically modified back, and we don't need to modify the current filter context as shown.

For your needs, you can provide some trusted input and output sample data so that we can better help you.

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.