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
DebbieE
Community Champion
Community Champion

DAX Help. Keep the slicer filer on a calculate

I have a star schema 

and some DAX

No Closed Issues = CALCULATE([Total Issues],'Dim Issue.[Status]' = "Closed")

 

And I have the following

ID SubID  Status

1    1a     Open

1     1b   Open

1     1c   Open

1    1d   Open

1    1e  Closed

 

And Im getting this (I dont like this table but its what is wanted)

 

ID   Status NoOpen    NoClosed

1     Open   5               6

1     Closed 1              6

 

So 6 is showing for both 

 

And I need this

ID   Status NoOpen    NoClosed

1     Open   5               0

1     Closed 0              5

 

Yep I dont like it either. But Is there a way i can do this by amending the above DAX

 

1 ACCEPTED SOLUTION
NaveenGandhi
Super User
Super User

Hi @DebbieE 

You have to make open and close measure like below.

Closed=

Var v1 = CALCULATE(COUNTROWS('Table'),'Table'[Status]="Closed")

Return if(SELECTEDVALUE('Table'[Status])="Closed",v1,0)

Let me know if this is what your are looking for.

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!



View solution in original post

1 REPLY 1
NaveenGandhi
Super User
Super User

Hi @DebbieE 

You have to make open and close measure like below.

Closed=

Var v1 = CALCULATE(COUNTROWS('Table'),'Table'[Status]="Closed")

Return if(SELECTEDVALUE('Table'[Status])="Closed",v1,0)

Let me know if this is what your are looking for.

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!



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.