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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Help - ALL function not filtering accurately

Hi,

 

My problem is the PLAN COUNT in the CARD visual. When I filter for a FLEXIPLAN_NAME, my goal is for the PLAN COUNT not to change. I used below formula for the PLAN COUNT:

 

Plan Count = CALCULATE(DISTINCTCOUNT('b2b_datalab_cvm_pp_result JJ_Mobility_Trading_Ranges'[FLEXIPLAN_NAME]), ALL('b2b_datalab_cvm_pp_result JJ_Mobility_Trading_Ranges'[FLEXIPLAN_NAME]))
 
When I filter for last 12 month renewal date, I have a total plan count of 337. However, when I start selecting for a plan name, the 337 changes BUT IT SHOULD NOT.
 
No Filter Plan Name Result (Plan Count = 337)
 
jdalfonso_0-1620995419027.png

 

With Filter Plan Name (Plan Count = 75): 

 

jdalfonso_1-1620995456288.png

 

The goal is to make that 337 a constant when I change PLAN NAMES. The only time that 337 changes is when I change the filter for the renewal date which I didnt include in the formula. 

 

Best,

John Jason

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Perhaps try:

COUNTROWS(DISTINCT(ALL('b2b_datalab_cvm_pp_result JJ_Mobility_Trading_Ranges'[FLEXIPLAN_NAME])))

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

Is your problem been solved? Can you share a sample fake data file? There is no problem with your formula, and it’s a bit difficult to modify if I don’t know the specific context.

 

Best Regards

Janey Guo

 

 

Anonymous
Not applicable

I found a way to solve this by creating a separate table. Thank you very much for your help @Greg_Deckler 

Greg_Deckler
Community Champion
Community Champion

@Anonymous Perhaps try:

COUNTROWS(DISTINCT(ALL('b2b_datalab_cvm_pp_result JJ_Mobility_Trading_Ranges'[FLEXIPLAN_NAME])))

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I still have issue:

 

Yes 421 is already constant but I should be getting 337 becuase of the renewal date filter and that 337 should not move unless I change renewal date. The only time that plan count should be changing is when I change renewal date and not when I change selection for Flexiplan Names

 

jdalfonso_1-1620998333181.png

 

Seems like ALLEXCEPT('Table'[Renewal Date]) but otherwise the same formula.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Still not working. Can I share my file? 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.