Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have a CALCULATE measure that references a fact table and a slicer on the report page references a DateTable that has a relationship with that Fact table.
My issue is, I would think that since there is a relationship between the Fact Table and the Date Table, that I could reference any of the columns of the DateTable or the Key date column in the fact table and put it inside the REMOVEFILTERS function and it would work. But it seems like I have to explicity use the exact table and column that is used to create the report slicer.
Am I missing something? If my measure gets used on a report that is sliced by Day then a new measure would have to be made if I wanted to use it on a report that was sliced by month? Example Below
CALCULATE(
SUMX (FactDailyInfo, FactDailyInfo[Income])
,REMOVEFILTERS ( DimDate[MonthYear]) )
This is what I would have to use if my report slicer was using DimDate[MonthYear]. But why couldn't I use DimDate[Date] since there is a relationship between the DimDate[Table] and it is the most granular level filter I would prefer to use it if possible.
Solved! Go to Solution.
By design, REMOVEFILTERS only removes filters on the tables/columns you specify.
Note that you can write REMOVEFILTERS ( DimDate ) to remove filters from all columns in the DimDate table.
Thanks for the reply from AlexisOlson.
According to your description, you used the column in DateTable as a slicer, but you need to remove the filtering role of that column in Measure right?
If your problem is not solved yet, could you please provide some sample data and the expected results based on that sample data? This will help us to help you better. How to provide sample data in the Power BI Forum - Microsoft Fabric Community Or show them as screenshots or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.
Best Regards,
Yulia Xu
By design, REMOVEFILTERS only removes filters on the tables/columns you specify.
Note that you can write REMOVEFILTERS ( DimDate ) to remove filters from all columns in the DimDate table.
This is what I ended up doing. I just had to add back the specific desired date range after the REMOVEFILTERS(DimDate) occurred. Thanks!
User | Count |
---|---|
16 | |
14 | |
13 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
15 | |
11 | |
9 |