cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User III
Super User III

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.






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
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
Super User III
Super User III

Any suggestion, or alternate solution  for this.






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.






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.





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.






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.





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

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






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
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors