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
lorenzocc
New Member

Slicer-set filter context doesn't propagate to table created with Summarize function

My DAX formula to create the table is:

DisbursementRatioTable =
SUMMARIZE(
factDonorReport,
factDonorReport[fiscal_year],
"Distribution Ratio", sum(factDonorReport[percExpenditure])/sum(factDonorReport[percBudget])
)

 

In the page report, I also have a slicer that shows all the values of another column of the factDonorReport. Whenever I try to modify the filter context by selecting one or more values of the slicer, the graph doesn't update.

 

I was hoping that the filter context set with the slicer on the factDonorReport would propagate to the values in the new table but it doesn't. Does anyone have any idea how this might work?

 

Thank you and regards,

 

lorenzocc

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@lorenzocc , Calculated table can not take slicer filter.

Only tables created as var in Measure can take filter/slicer Value

View solution in original post

Thank you for the response. Although what you are saying is not entirely clear, it is also true and was helpful in solving it.

 

What I did was to create a single measure that calculated the ratio between the sum(factDonorReport[percExpenditure]) and sum(factDonorReport[percBudget]) in a CALCULATE formula that reset all filters except for those accessible through the slicer(s) with an ALLEXCEPT statement.

 
DisburRatio = CALCULATE(
SUM(factDonorReport[percExpenditure])/SUM(factDonorReport[percBudget]),
ALLEXCEPT(factDonorReport,factDonorReport[fiscal_year], factDonorReport[donor_type_lvl3_descr])
)

 

After which, I did not create a new table based on this calculated measure but instead worked directly on the visualization. I placed factDonorTable[fiscal_year] in the x_axis field and the new measure on the Values field. This seemed to work fine since a filter context (transitioned from a row context) was created by the x_axis and was intersected with the current filter context created by the slicers.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@lorenzocc , Calculated table can not take slicer filter.

Only tables created as var in Measure can take filter/slicer Value

Thank you for the response. Although what you are saying is not entirely clear, it is also true and was helpful in solving it.

 

What I did was to create a single measure that calculated the ratio between the sum(factDonorReport[percExpenditure]) and sum(factDonorReport[percBudget]) in a CALCULATE formula that reset all filters except for those accessible through the slicer(s) with an ALLEXCEPT statement.

 
DisburRatio = CALCULATE(
SUM(factDonorReport[percExpenditure])/SUM(factDonorReport[percBudget]),
ALLEXCEPT(factDonorReport,factDonorReport[fiscal_year], factDonorReport[donor_type_lvl3_descr])
)

 

After which, I did not create a new table based on this calculated measure but instead worked directly on the visualization. I placed factDonorTable[fiscal_year] in the x_axis field and the new measure on the Values field. This seemed to work fine since a filter context (transitioned from a row context) was created by the x_axis and was intersected with the current filter context created by the slicers.

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.