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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
redgun24
New Member

DAX Help - Calculating Count at Subtotal Level

Hi all,

 

New to DAX. I'm trying to only show conflicts (1, 2, 3, 4, 5) in the below visualization that have more that one entitlement (AP Invoice Entry, AP Supplier Master, etc.). For the example below the desired end result would be to see conflicts 3 & 5 disappear because they only have one entitlement rather than two.

 

I tried using a filter but realized that applied at the lowest level, in this case the entitlement. Is there a way to add a measure that would calculate the # of entitlements under a given conflict? I could then use this as a slicer or to filter.

 

Thank you!

 

ExanokeExanoke

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @redgun24 

Try to add measure in your table

Measure = calculate(count('Table'[Entitlement]);ALLSELECTED('Table'[Entitlement]))

then in Filters pane add "Measure" to a "Filters on this visual" and check Measure is greater than 1 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

4 REPLIES 4
az38
Community Champion
Community Champion

Hi @redgun24 

Try to add measure in your table

Measure = calculate(count('Table'[Entitlement]);ALLSELECTED('Table'[Entitlement]))

then in Filters pane add "Measure" to a "Filters on this visual" and check Measure is greater than 1 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hey Az38,

 

I was able to get this to work. Thank you!

Az38 = calculate(count('Conflicts & Entitlements'[Entitlement]), ALLSELECTED('Conflicts & Entitlements'[Entitlement]))
Nathaniel_C
Super User
Super User

Hi @redgun24 ,
If I understand, you want to filter the visual. Try this measure:

Show only = If(MAX(Conflicts[Counter])>1,MAX(Conflicts[Counter]),BLANK())

my table is Conflicts.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

fil1.PNG

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hey Nathaniel,

 

Thank you for the reply. I tried the formula, assuming that your Counter is my Count of Entitlements but was getting the below error. Am I missing something? 

 

2019-11-25 09_54_52-FINAL_SoD Analysis - Power BI Desktop.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors