The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I have projects with Name, Year, Planned Quarter, Actual Quarter as different quarters. Also I have two slicers Year and PlannedQuarter. I am able to show the number of planned projects in the selected quarter(s) and it's working fine.
But few projects planned in Q1 for example, executed in Q2 and so on. So I need to calculate the count how many acctualy executed in Q1. For that I need to remove the existing filter with REMOVEFILTER or can use ALL. So that I can ignore page slicer and apply other filters I want. But struglling with that part, any hints/help is much appreciated,
Attaching the .pbix file with data too for reference. Sample PBIX File
TotalProjects = COUNTROWS(Sheet1) + 0
TotalActualCasesCount =
VAR selectedQuarters = ALLSELECTED(Sheet1[PlannedQuarter])
VAR All_Projects = ALL('Sheet1')
//VAR All_Projects_RemoveFilter = REMOVEFILTERS('Sheet1', 'Sheet1'[PlannedQuarter])
RETURN
CALCULATE([TotalProjects], Sheet1[ActualQuarter ] in selectedQuarters) + 0
Solved! Go to Solution.
Thank you very much Jihwan_Kim for your prompt reply.
Try this:
Measure TotalActualCasesCount =
CALCULATE(
[TotalProjects],
REMOVEFILTERS(Sheet1[PlannedQuarter])
) + 0
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much Jihwan_Kim for your prompt reply.
Try this:
Measure TotalActualCasesCount =
CALCULATE(
[TotalProjects],
REMOVEFILTERS(Sheet1[PlannedQuarter])
) + 0
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I am not sure if I understood your question correctly, but please try something like below and please check if it produces the result that you want.
TotalActualCasesCount =
VAR selectedQuarters =
VALUES ( Sheet1[PlannedQuarter] )
RETURN
COUNTROWS (
FILTER ( ALL ( 'Sheet1' ), Sheet1[ActualQuarter ] IN selectedQuarters )
)
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |