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
AleksandrMe
Resolver I
Resolver I

Percentage between two columns

Good day, 

 

I have two tables, related to each other by fist column (name of the source file). I'm looking for measure to show me how many "RISK and HIGH RISK" checks were done comparing to "none or standard". Result should be in procents and filtered by year (2021)

 

SOURSE FILE NAMEREASON FOR CHECK   SOURSE FILE NAMEDate of Check
1none  12020
2risk  22020
3high risk  32021
4none  42021
5standard  52021
6risk  62021

 

For example in 2021 there were 4 checks where two of these were (Risk/High Risk) - final result is 50% in 2021. 

 

Thnaks

Aleks 

1 REPLY 1
DataInsights
Super User
Super User

@AleksandrMe,

 

Try these measures:

 

Check Count = COUNT ( CheckReason[SOURSE FILE NAME] )

Check Percent = 
VAR vNumerator =
    CALCULATE (
        [Check Count],
        CheckReason[REASON FOR CHECK] IN { "risk", "high risk" }
    )
VAR vDenominator = [Check Count]
VAR vResult =
    DIVIDE ( vNumerator, vDenominator )
RETURN
    vResult

 

DataInsights_0-1626043175952.png

 





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

Proud to be a Super User!




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