Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

True and False Filter

Hi Expert

 

I have the following measure which counts the number of either True or False rows. How could i write the measure based on the Slicer....so if true was selected - based on selected value return back True Count and if False Return back False Count

Measure =
VAR _Tru = Countrows(Filter(App Forms[IsEvent] = "TRUE")) +0
VAR -FAL =  Countrows(Filter(App Forms[IsEvent] = "FALSE") +0

????

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , a measure like 

Measure = Countrows(Filter(App Forms[IsEvent] = selectedvalue(App Forms[IsEvent] ))) +0


 

or

Measure =
VAR _Tru = Countrows(Filter(App Forms[IsEvent] = "TRUE")) +0
VAR _FAL = Countrows(Filter(App Forms[IsEvent] = "FALSE") +0

return

if(selectedvalues(filter[filter]) = "True", _Try, __FAL)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , a measure like 

Measure = Countrows(Filter(App Forms[IsEvent] = selectedvalue(App Forms[IsEvent] ))) +0


 

or

Measure =
VAR _Tru = Countrows(Filter(App Forms[IsEvent] = "TRUE")) +0
VAR _FAL = Countrows(Filter(App Forms[IsEvent] = "FALSE") +0

return

if(selectedvalues(filter[filter]) = "True", _Try, __FAL)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit - Could u have a look at this its off by one row....i.e. the end results need to shift up one row....cannot work it out
https://community.powerbi.com/t5/Desktop/Measure-to-start-from-a-specific-date/m-p/1941439#M739034

 

Anonymous
Not applicable

Thanks Amit

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.