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
jujiro-eb
Helper I
Helper I

How to keep the global report filters in tact for a dataset based report

I have a large transaction table, CompanySales, with the following important columns in a dataset.
SaleDate
State
Category
SubCategory
SalesAmount
..
other columns which can be added to the filter by the user.
...
ReportContext1
ReportContext2
ReportContext3
I have three separate reports Report1, Report2, and Report3.
Report1 uses a report wide filter ReportContext1 = true.
Report2 uses a report wide filter ReportContext2 = true.
Report3 uses a report wide filter ReportContext3 = true.
Which I set within the respective report itself.

I have a measure which calculates the total sales for the entire state.

StateWideSales = CALCULATE (SUM(SalesAmount), ALLEXCEPT(CompanySales[State]))
The problem I have is that ALLEXCEPT loses the report context. As a result, I start including data in the reports, which was not meant for it.  I can fix this issue by rewriting the measure as following:
 
StateWideSales = CALCULATE (SUM(SalesAmount), 
    ALLEXCEPT(
        CompanySales[State],
        CompanySale[ReportContext1],
        CompanySale[ReportContext2],
        CompanySale[ReportContext3]))
 
Obviously, the issue with the solution is that I need to remember to do it for every such type of measure.
Secondly, if in future I add a fourth report connected to the same model, I will have to reflect this change in every measure in future.
 
What will be the best way to address this dilemma?
 
Thanks!
1 REPLY 1
Anonymous
Not applicable

The best way to address dilemmas in PBI is to learn proper data modeling techniques. This should get you started:

https://www.youtube.com/watch?v=78d6mwR8GtA&t=1247s

Best
D

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.

Top Solution Authors