The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have a report page where I have 3 filters:
Reporting Date is in Current Month
Reported in Future = No
Reported Today = No
I want to make a measure that counts the Reporting Days in the month (Working days) - ignoring the two "No" filters.
This is for another measure, but I've just isolated the measure to find a solution.
My measure right now is:
Hi @Sperling ,
I have made a sample with REMOVEFILTERS() on myside. It works on myside. It will remove the filters from slicer or filters in filter pane. I think your issue should be caused by your data model. Please share a sample file with me and show me a screenshot with the result you want. This will make it easier for us to find the solution.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Sperling CALCULATE evaluates FILTER arguments before CALCULATE modifiers such as REMOVEFILTERS, Reporting Date inside FILTER function already gets filtered before REMOVEFILTERS and then REMOVEFILTERS is applied after which the table returned by FILTER is applied to the filter context.
Use this instead
CALCULATE(
COUNTROWS('Reporting Date'),
NOT 'Reporting Date'[Reporting Weekday] IN {"Saturday", "Sunday"},
REMOVEFILTERS(
'Reporting Date'[Reported In Future?],
'Reporting Date'[Reported Today?]
)
)
Hi Antriksh,
Unfortunately this measure doesn't work either.
Here's a screenshot of my test PBI file and DaysInMonth is the measure I'm testing out.
Hi, @Sperling
You can use edit interaction to avoide slicer effect on your visuals
for more about edit interaction please refer these video.
and yah! here you use
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Hi Dangar,
Thanks for your reply.
Unfortunately the filters are not in the report itself in a slicer, but added as a filter.
It's a KPI report, so I don't want them present in the view - I could do that and hide them, but I don't think it's a great solution down the line in case someone has to take over.
I tried using ALL() also, but I'm not having luck getting it to work. For example, this also returns a value of 1 (final solution should also remove the "Reported Today" filter, but just tested without it):
hi, @Sperling
var table1 = calculatetable(all(
return
Hi again,
Seems that this approach also counts the first sunday?
It rightfully counts today since it ignores the page filter of reported today, but still doesn't ignore reported in future.
So confusing.
I'll look into creating a file with sample data, but its a traditional date dimension
hi, @Sperling if its not working then provide some sample date without confidential information
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
9 | |
7 |