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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
parry2k
Super User
Super User

how to create table Summarizecolumns keep filter context

Hi there, 

 

I have a table with following 3 columns and there is a slicer on date and I'm trying to create a calculated table with keeping current filter context from date slicer:


column in my table : Category, date, amount

 

This is the command I'm trying for calculated table:

 

Table3 Is Zero = 
 SUMMARIZECOLUMNS(Table3[Category],Filter(Table3,Table3[Amount]=0), "IsData",CountRows(Table3))

 

What I'm getting in summary table for all the rows from table3 not what is selected on date slicer, how I can keep the filter context from table3.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@parry2k

 

If you use that function inside a measure the answer is YES. But if want to use to create a new table (Like Summarize or CalculateTable) is not possible.

 

The calculated table is preprocessed before use slicer visual to filter data. So we are not able to use the checked slicer value in the calculated table. (v-qiuyu-MSFT)

 




Lima - Peru

View solution in original post

7 REPLIES 7
parry2k
Super User
Super User

Any suggestion, or alternate solution  for this.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Any help here.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Vvelarde
Community Champion
Community Champion

@parry2k

 

Hi, i think that is not possible because Datasource & New Tables (From Dax)  is loaded to the data Model and don't be interactive with visuals or measures.

 

Regards

 

Victor




Lima - Peru

Thanks @Vvelarde

 

The basic question here is if a calculated table can be created from already filter applied to the source table from slicers?

 

Assume, a table has data for each day Jan 1 to Dec 31, and date slicer is selcted Mar 1 - Mar 31, can DAX create create calcualted table for that date range selected by slicer.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Vvelarde
Community Champion
Community Champion

@parry2k

 

If you use that function inside a measure the answer is YES. But if want to use to create a new table (Like Summarize or CalculateTable) is not possible.

 

The calculated table is preprocessed before use slicer visual to filter data. So we are not able to use the checked slicer value in the calculated table. (v-qiuyu-MSFT)

 




Lima - Peru

Interesting. Good to know. I thought there is a way to keep filter context when creating calculate/summarizae table.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k Had a similar issue and found a solution by creating a measure within my summary table that changed its value based on the sum of the rows. For example, I have a table like this for a household survey:

RowCategory
1Has internet
2Has telephone
3Has computer
4Has washer
5Has car

 

Then a measure within the same table table that looks something this:

 

IF(SUM(ROW)=1,[SUMX expression to summarize households with internet],IF(SUM(ROW)=2,[SUMX expression to summarize households with telephone] etc.

 

Then I can create any graphic where I plot my measure against the column "Category", and the measure will adjust dynamically to any filters applied.

 

This is a very basic explanation, but can post a more complete example if that would be helpful.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.