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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
ninos-shiba
Resolver I
Resolver I

How to find the total for each day in order to find the % of noncompliance/total for each day?

Below is a sample of the data:

 

Date          Category
8/1/19       Compliant

8/1/19       Noncompliant

8/1/19       Compliant

8/3/19       Noncompliant

8/3/19       Compliant
8/5/19       Noncompliant

 

I want to tally up the grand total (noncompliance + compliance) for each day and then find the percentage of noncompliance over the total (noncompliance + compliance) for each day. Is there any way I could do this?

1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@ninos-shibayes this is possible

 

Measure 2 =
DIVIDE (
    CALCULATE (
        COUNTROWS ( 'Table' ),
        ALLEXCEPT ( 'Table', 'Table'[Date] ),
        'Table'[CAT] = "NonCom"
    ),
    CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
)

Capture.PNG

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

2 REPLIES 2
smpa01
Super User
Super User

@ninos-shibayes this is possible

 

Measure 2 =
DIVIDE (
    CALCULATE (
        COUNTROWS ( 'Table' ),
        ALLEXCEPT ( 'Table', 'Table'[Date] ),
        'Table'[CAT] = "NonCom"
    ),
    CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
)

Capture.PNG

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Greg_Deckler
Community Champion
Community Champion

Probably something like:

 

Measure = DIVIDE(COUNTROWS(FILTER('Table',[Column1]="Noncompliant")),COUNTROWS('Table'),0)

See attached.



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...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors